Documentation
¶
Overview ¶
Package wildcard provides a fast, zero-allocation wildcard matcher.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaseSensitivity ¶
type CaseSensitivity bool
CaseSensitivity controls the case sensitivity of matching.
const ( CaseSensitive CaseSensitivity = true CaseInsensitive CaseSensitivity = false )
CaseSensitivity values.
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher matches strings against a wildcard pattern with configurable case sensitivity.
func NewMatcher ¶
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.
Click to show internal directories.
Click to hide internal directories.