import "go.elastic.co/apm/internal/wildcard"
Package wildcard provides a fast, zero-allocation wildcard matcher.
CaseSensitivity controls the case sensitivity of matching.
const ( CaseSensitive CaseSensitivity = true CaseInsensitive CaseSensitivity = false )
CaseSensitivity values.
type Matcher struct {
// contains filtered or unexported fields
}
Matcher matches strings against a wildcard pattern with configurable case sensitivity.
func NewMatcher(p string, caseSensitive CaseSensitivity) *Matcher
NewMatcher constructs a new wildcard matcher for the given pattern.
If p is the empty string, it will match only the empty string. If p is not a valid UTF-8 string, matching behaviour is undefined.
Match reports whether s matches m's wildcard pattern.
Matchers is a slice of Matcher, matching any of the contained matchers.
MatchAny returns true iff any of the matchers returns true.
Package wildcard imports 3 packages (graph) and is imported by 5 packages. Updated 2019-02-19. Refresh now. Tools for package owners.