Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Conflicts ¶
Conflicts takes 2 maps returns true if there a key match between the maps but the value doesn't match returns false in other cases
func Merge ¶
Merge combines given maps Note: It doesn't not check for any conflicts between the maps
func Parse ¶
Parse takes a string representing a selector and returns map[key]value, or an error. The input will cause an error if it does not follow this form:
<selector-syntax> ::= [ <requirement> | <requirement> "," <selector-syntax> ] <requirement> ::= KEY "=" VALUE KEY is a sequence of one or more characters following [ DNS_SUBDOMAIN "/" ] DNS_LABEL VALUE is a sequence of zero or more characters "([A-Za-z0-9_-\.])". Max length is 64 character. Delimiter is white space: (' ', '\t')
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer represents the Lexer struct for label selector. It contains necessary informationt to tokenize the input string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser data structure contains the label selector parser data structure
type ScannedItem ¶
type ScannedItem struct {
// contains filtered or unexported fields
}
ScannedItem are the item produced by the lexer. It contains the Token and the literal.