glob

package
v0.54.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DebugEnabled bool    = false
	DebugFunc    LogFunc = fmt.Println
)

Functions

func Debug

func Debug(format string, args ...interface{})

Types

type Globber

type Globber struct {
	// contains filtered or unexported fields
}

func New

func New(expression string) *Globber

func (*Globber) Len

func (g *Globber) Len() int

func (*Globber) Match

func (g *Globber) Match(s ...string) ([]Result, error)

func (*Globber) MatchFiles

func (g *Globber) MatchFiles(_fs fs.FS, root string) (Results, error)

func (*Globber) MatchString

func (g *Globber) MatchString(s string) (*Result, error)

type LogFunc

type LogFunc func(a ...any) (n int, err error)

type Result

type Result struct {
	Path   string
	Result string
}

func (*Result) String

func (r *Result) String() string

type Results

type Results []Result

func Glob

func Glob(_fs fs.FS, root string, pattern string) (Results, error)

func (*Results) String

func (results *Results) String() string

type Token

type Token int
const (
	ILLEGAL Token = iota
	EOF
	SLASH
	LITERAL
	STAR
	SQUARE_BRACKET_LEFT
	SQUARE_BRACKET_RIGHT
	INTEROGATION_MARK
	DOUBLESTAR
	SQUARE_BRACKET
	DOUBLESTARSLASH
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL