Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoIncludeRules = errors.New("no include rules specified")
Functions ¶
This section is empty.
Types ¶
type RegexpListItem ¶
func ParseRegexpListItem ¶
func ParseRegexpListItem(val string) (RegexpListItem, error)
func (RegexpListItem) String ¶
func (r RegexpListItem) String() string
type RegexpMatcher ¶
type RegexpMatcher struct {
// contains filtered or unexported fields
}
func NewRegexpMatcher ¶
func NewRegexpMatcher(include, exclude []*regexp.Regexp) (*RegexpMatcher, error)
NewRegexpMatcher returns the RegexpMatcher with given include and exclude rules.
func NewRegexpMatcherFromList ¶
func NewRegexpMatcherFromList(l []RegexpListItem) (*RegexpMatcher, error)
func (*RegexpMatcher) Inverse ¶
func (r *RegexpMatcher) Inverse() *RegexpMatcher
Inverse returns a new RegexpMatcher that inverts the match result.
func (*RegexpMatcher) Match ¶
func (r *RegexpMatcher) Match(s string) bool
Match returns true if the given string matches at least one of the include rules and does not match the exclude rules.
Click to show internal directories.
Click to hide internal directories.