Documentation ¶
Overview ¶
Package glob defines a globbing syntax and implements matching routines.
Globs match a slash separated series of glob expressions.
// Patterns: term ['/' term]* term: '*' matches any sequence of non-Separator characters '?' matches any single non-Separator character '[' [ '^' ] { character-range } ']' // Character classes (must be non-empty): c matches character c (c != '*', '?', '\\', '[', '/') '\\' c matches character c // Character-ranges: c matches character c (c != '\\', '-', ']') '\\' c matches character c lo '-' hi matches character c for lo <= c <= hi
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
Element represents a single element of a glob pattern.
func (*Element) FixedPrefix ¶
FixedPrefix returns the unescaped fixed part of the pattern, and whether the prefix is the whole pattern. The fixed part does not contain any wildcards.
type Glob ¶
type Glob struct {
// contains filtered or unexported fields
}
Glob represents a slash separated path glob pattern.
func (*Glob) Restricted ¶
Restricted returns true if recursion is restricted (up to the caller to know what that means).
func (*Glob) SplitFixedElements ¶
SplitFixedElements returns the part of the glob pattern that contains only fixed elements, and the glob that follows it.
Click to show internal directories.
Click to hide internal directories.