Documentation
¶
Overview ¶
Package match implements the simple glob matching used by routing rules to compare namespaces and metadata values.
A pattern is one of four forms: a literal (exact match), a prefix glob ("foo*", starts-with), a suffix glob ("*foo", ends-with), or a contains glob ("*foo*"). A pattern consisting only of '*' (for example "*", "**") matches anything. A "*" anywhere other than the leading or trailing position is rejected at compile time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher is a compiled glob pattern. The zero value matches only the empty string. Construct one with Compile.
func MustCompile ¶
MustCompile is like Compile but panics if pattern is invalid. It is meant for package-level variables and tests where an invalid pattern is a programming error.