Versions in this module Expand all Collapse all v0 v0.1.0 Aug 1, 2026 Changes in this version + const DefaultBraceExpandMax + const DefaultMaxExtglobRecursion + const DefaultMaxGlobstarRecursion + const DefaultOptimizationLevel + const ExpansionMax + const ExpansionMaxLength + const ExtglobNegate + const ExtglobOne + const ExtglobOptional + const ExtglobPlus + const ExtglobStar + const MaxPatternLength + const TokenExtglobClose + const TokenExtglobOpen + const TokenPipe + const TokenText + var ErrInvalidPattern = errors.New("invalid pattern") + var ErrPatternTooLong = errors.New("pattern is too long") + var GlobStar = globStar + func Bool(v bool) *bool + func BraceExpand(pattern string, opts Options) ([]string, error) + func Escape(s string, opts EscapeOptions) string + func Filter(pattern string, opts Options) func(string) bool + func Int(v int) *int + func IsExtglobType(c byte) bool + func MakeRe(pattern string, opts Options) (*regexp2.Regexp, bool, error) + func Match(p, pattern string, opts Options) (bool, error) + func MatchList(list []string, pattern string, opts Options) ([]string, error) + func Unescape(s string, opts UnescapeOptions) string + func ValidatePattern(pattern string) error + type AST = ast.AST + func ParseGlob(pattern string, opts Options) *AST + func ParseTokens(src string, tokens []Token, opts Options) *AST + type ASTPart = ast.ASTPart + type Defaults struct + func NewDefaults(def Options) Defaults + func (d Defaults) BraceExpand(pattern string, opts Options) ([]string, error) + func (d Defaults) Escape(s string, opts EscapeOptions) string + func (d Defaults) Filter(pattern string, opts Options) func(string) bool + func (d Defaults) MakeRe(pattern string, opts Options) (*regexp2.Regexp, bool, error) + func (d Defaults) Match(p, pattern string, opts Options) (bool, error) + func (d Defaults) MatchList(list []string, pattern string, opts Options) ([]string, error) + func (d Defaults) NewMinimatch(pattern string, opts Options) (*Minimatch, error) + func (d Defaults) ParseGlob(pattern string, opts Options) *AST + func (d Defaults) Unescape(s string, opts UnescapeOptions) string + type EscapeOptions struct + MagicalBraces bool + WindowsPathsNoEscape bool + func EscapeOptionsFrom(o Options) EscapeOptions + type ExtglobType = scan.ExtglobType + type MMPattern = ast.MMPattern + type Minimatch struct + Comment bool + Empty bool + GlobParts [][]string + GlobSet []string + IsWindows bool + MaxGlobstarRecursion int + Negate bool + NoCase bool + Nonegate bool + Options Options + Partial bool + Pattern string + Platform Platform + PreserveMultipleSlashes bool + Set [][]PatternPart + WindowsNoMagicRoot bool + WindowsPathsNoEscape bool + func NewMinimatch(pattern string, opts Options) (*Minimatch, error) + func (m *Minimatch) HasMagic() bool + func (m *Minimatch) LevelTwoFileOptimize(parts []string) []string + func (m *Minimatch) MakeRe() (*regexp2.Regexp, bool) + func (m *Minimatch) Match(f string) bool + func (m *Minimatch) MatchOne(file []string, pattern []PatternPart, partial bool) bool + func (m *Minimatch) MatchPartial(f string, partial bool) bool + func (m *Minimatch) Preprocess(globParts [][]string) [][]string + func (m *Minimatch) SlashSplit(p string) []string + type Options struct + AllowWindowsEscape *bool + BraceExpandMax *int + Debug bool + Dot bool + FlipNegate bool + MagicalBraces bool + MatchBase bool + MaxExtglobRecursion *int + MaxGlobstarRecursion *int + NoBrace bool + NoCase bool + NoCaseMagicOnly bool + NoComment bool + NoExt bool + NoGlobStar bool + NoNegate bool + NoNull bool + OptimizationLevel *int + Partial bool + Platform Platform + PreserveMultipleSlashes bool + WindowsNoMagicRoot *bool + WindowsPathsNoEscape bool + func (o Options) EffectiveBraceExpandMax() int + func (o Options) EffectiveIsWindows() bool + func (o Options) EffectiveMaxExtglobRecursion() int + func (o Options) EffectiveMaxGlobstarRecursion() int + func (o Options) EffectiveOptimizationLevel() int + func (o Options) EffectivePlatform() Platform + func (o Options) EffectiveWindowsNoMagicRoot() bool + func (o Options) EffectiveWindowsPathsNoEscape() bool + type ParseClassResult = class.ParseClassResult + func ParseClass(pattern string, position int) (ParseClassResult, error) + type PatternPart struct + HasMM bool + IsGlobStar bool + MM MMPattern + Str string + Test func(string) bool + UFlag bool + type Platform string + const PlatformAIX + const PlatformAndroid + const PlatformCygwin + const PlatformDarwin + const PlatformFreeBSD + const PlatformHaiku + const PlatformLinux + const PlatformNetBSD + const PlatformOpenBSD + const PlatformSunOS + const PlatformWin32 + func HostPlatform() Platform + func (p Platform) IsWindows() bool + func (p Platform) PathSep() Sep + type RegExpSource = ast.RegExpSource + type Sep string + const SepPOSIX + const SepWindows + func HostSep() Sep + type Token = scan.Token + func Scan(segment string, opts Options) []Token + type TokenKind = scan.TokenKind + type UnescapeOptions struct + MagicalBraces *bool + WindowsPathsNoEscape bool + func UnescapeOptionsFrom(o Options) UnescapeOptions