Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PatternSet ¶
type PatternSet struct {
// contains filtered or unexported fields
}
func NewPrefixPatternMatchSet ¶
func NewPrefixPatternMatchSet(prefixes ...string) *PatternSet
NewPrefixPatternMatchSet returns a new PatternMatchSet with prefixes.
func NewSet ¶
func NewSet(sliceFn SliceFn, patterns ...string) *PatternSet
NewSet returns a new PatternMatchSet with patterns.
func NewSuffixPatternMatchSet ¶
func NewSuffixPatternMatchSet(suffixes ...string) *PatternSet
NewSuffixPatternMatchSet returns a new PatternMatchSet with suffixes.
func (*PatternSet) AddAll ¶
func (p *PatternSet) AddAll(patterns ...string)
AddAll adds all patterns to the set.
func (*PatternSet) Match ¶
func (p *PatternSet) Match(content string) bool
Match returns true if the content matches any pattern.
func (*PatternSet) MatchedSlice ¶
func (p *PatternSet) MatchedSlice(content string) string
MatchedSlice returns the matched slice of the content.
Click to show internal directories.
Click to hide internal directories.