Documentation
¶
Index ¶
Constants ¶
View Source
const UnlimitedDepth = math.MaxInt
UnlimitedDepth can be passed as the depth argument to indicate there is no depth limit.
Variables ¶
This section is empty.
Functions ¶
func IsImplicitGlob ¶
IsImplicitGlob checks if a path component is implicitly a glob. An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension, and does not contain any glob characters itself.
Types ¶
type SpecMatcher ¶
type SpecMatcher struct {
// contains filtered or unexported fields
}
SpecMatcher wraps multiple glob patterns for matching paths.
func NewSpecMatcher ¶
func NewSpecMatcher(specs []string, basePath string, usage Usage, useCaseSensitiveFileNames bool) *SpecMatcher
NewSpecMatcher creates a matcher for one or more glob specs. It returns a matcher that can test if paths match any of the patterns.
func (*SpecMatcher) MatchIndex ¶
func (m *SpecMatcher) MatchIndex(path string) int
MatchIndex returns the index of the first matching pattern, or -1.
func (*SpecMatcher) MatchString ¶
func (m *SpecMatcher) MatchString(path string) bool
MatchString returns true if any pattern matches the path.
Click to show internal directories.
Click to hide internal directories.