Documentation ¶
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 returned by NewMatcher and contains a list of blices to match against
func NewMatcher ¶
NewMatcher creates a new Matcher used to match against a set of blices
func NewStringMatcher ¶
NewStringMatcher creates a new Matcher used to match against a set of strings (this is a helper to make initialization easy)
func (*Matcher) Contains ¶
Contains returns true if any string matches. This can be faster than Match() when you do not need to know which words matched.
func (*Matcher) Match ¶
Match searches in for blices and returns all the blices found as indexes into the original dictionary.
This is not thread-safe method, seek for MatchThreadSafe() instead.
func (*Matcher) MatchThreadSafe ¶
MatchThreadSafe provides the same result as Match() but does it in a thread-safe manner. Uses a sync.Pool of haystacks to track the uniqueness of the result items.