2024-10-15 14:53:06 +02:00

41 lines
935 B
Go

package fields
import docvalues "config-lsp/doc-values"
var booleanEnumValue = docvalues.EnumValue{
EnforceValues: true,
Values: []docvalues.EnumString{
docvalues.CreateEnumString("yes"),
docvalues.CreateEnumString("no"),
},
}
var channelTimeoutExtractor = docvalues.ExtractKeyDuplicatesExtractor("=")
func prefixPlusMinusCaret(values []docvalues.EnumString) docvalues.PrefixWithMeaningValue {
return docvalues.PrefixWithMeaningValue{
Prefixes: []docvalues.Prefix{
{
Prefix: "+",
Meaning: "Append to the default set",
},
{
Prefix: "-",
Meaning: "Remove from the default set",
},
{
Prefix: "^",
Meaning: "Place at the head of the default set",
},
},
SubValue: docvalues.ArrayValue{
Separator: ",",
DuplicatesExtractor: &docvalues.SimpleDuplicatesExtractor,
RespectQuotes: true,
SubValue: docvalues.EnumValue{
Values: values,
},
},
}
}