Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasMultipleMatchers ¶
HasMultipleMatchers returns true if the matcher contains multiple definitions
func HasWildCards ¶
HasWildCards returns true if the passed matcher string contains a wildcard, false otherwise.
Types ¶
type StringMatcher ¶
type StringMatcher interface { fmt.Stringer // Matches returns true if the provided value is matched by the matcher Matches(value string) Result // WasMatched returns nil if the matcher had a match, otherwise returning a diagnostic error WasMatched() error // IsRestrictive returns true if the matcher is populated and will restrict matches IsRestrictive() bool }
StringMatcher is an interface implemented by predicates used to test string values
func NewStringMatcher ¶
func NewStringMatcher(matcher string) StringMatcher
NewStringMatcher returns a matcher for the specified string Different strings may return different implementations: o If the string contains ';', a multi-matcher of sub-matches, one for each item in the string separated by ';' o If the string contains '*' or '?' a globbing wildcard matcher o Otherwise a case-insensitive literal string matcher
Click to show internal directories.
Click to hide internal directories.