Documentation
¶
Overview ¶
Package blacklist provides a filter meant to exclude files from scanning.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blacklist ¶
type Blacklist struct {
Patterns []Item
// contains filtered or unexported fields
}
Blacklist wraps a number of Items.
func NewBlacklist ¶
NewBlacklist creates a new Blacklist from the given patterns.
type GlobItem ¶
GlobItem matches paths using the well-known globbing mechanism.
func (*GlobItem) GetPattern ¶
GetPattern returns the Item's Pattern string
func (*GlobItem) HitCount ¶
HitCount returns the number of times the Item has matched a path successfully
type Item ¶
type Item interface {
GetID() int64
GetPattern() string
IsGlob() bool
Match(path string) bool
HitCount() int64
}
Item is the common interface for several types of Blacklist patterns.
func NewGlobItem ¶
NewGlobItem creates a new GlobItem from the given pattern
type ReItem ¶
ReItem matches filenames against a regular expression.
func (*ReItem) GetPattern ¶
GetPattern returns the Item's pattern string
func (*ReItem) HitCount ¶
HitCount returns the number of times the Item has matched a path successfully