Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchResult ¶
type MatchResult int
MatchResult defines outcomes of a match, no match, exclusion or inclusion.
const ( // NoMatch defines the no match outcome of a match check NoMatch MatchResult = iota // Exclude defines an exclusion of a file as a result of a match check Exclude // Include defines an explicit inclusion of a file as a result of a match check Include )
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher defines a matcher for a single gitignore pattern
func NewMatcher ¶
NewMatcher constructs a new simple matcher for a single pattern
type Pattern ¶
type Pattern interface {
// Match matches the given path to the pattern.
Match(path []string, isDir bool) MatchResult
}
Pattern defines a single gitignore pattern.
func ParsePattern ¶
ParsePattern parses a gitignore pattern string into the Pattern structure.
Click to show internal directories.
Click to hide internal directories.