Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterGlobParts ¶
FilterGlobParts removes any string with glob wildcard.
func HasGlobChar ¶
HasGlobChar returns whether s contains any glob wildcards.
func NormalizePath ¶
func ResolveRootDir ¶
ResolveRootDir takes a normalized path on the form "assets/**.json" and determines any root dir, i.e. any start path without any wildcards.
Types ¶
type FilenameFilter ¶ added in v0.11.1
type FilenameFilter struct {
// contains filtered or unexported fields
}
func MustNewFilenameFilter ¶ added in v0.11.1
func MustNewFilenameFilter(inclusions, exclusions []string) *FilenameFilter
MustNewFilenameFilter invokes NewFilenameFilter and panics on error.
func NewFilenameFilter ¶ added in v0.11.1
func NewFilenameFilter(inclusions, exclusions []string) (*FilenameFilter, error)
NewFilenameFilter creates a new Glob where the Match method will return true if the file should be included. Note that the inclusions will be checked first.
func NewFilenameFilterForInclusionFunc ¶ added in v0.11.1
func NewFilenameFilterForInclusionFunc(shouldInclude func(filename string) bool) *FilenameFilter
NewFilenameFilterForInclusionFunc create a new filter using the provided inclusion func.
Click to show internal directories.
Click to hide internal directories.