Documentation
¶
Overview ¶
Package glob matches slash-separated paths against glob patterns: "*" and "?" stay within one path element, "**" as a whole element matches any number of elements (none included), "[...]" is a character class ("[!...]" negated) and "{a,b}" lists alternatives. Every MatrixClaw path pattern goes through it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ignore ¶
type Ignore struct {
// contains filtered or unexported fields
}
Ignore is a stack of .gitignore rules; later rules win, as in git. The zero Ignore ignores nothing.
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern is a compiled glob.
func Compile ¶
Compile compiles pattern. It never fails: an unclosed bracket or brace and a class Go cannot express are literal text.
func CompileFilter ¶
CompileFilter compiles a filter pattern the way ripgrep and .gitignore read one: a pattern with no slash matches a name at any depth.
func (*Pattern) MatchVisible ¶
MatchVisible is Match where wildcards skip hidden names (a leading dot), so only an element that starts with a dot itself, such as ".github", names one.