Glob utilities built on top of the well-tested gobwas/glob.
- Supports wildcard globs like
**
- Faster matching and walking by pulling out the non-wildcard parts of a glob (e.g.
/posts/
in/posts/**
) - Supports globs like
{posts/**,tags/**}
by pre-expanding globs.
go get github.com/matthewmueller/glob
package main
import (
"github.com/matthewmueller/glob"
)
func main() {
files, _ := glob.Match("[A-Z]*.md")
for _, file := range files {
fmt.Println(file)
}
// Output:
// Changelog.md
// License.md
// Readme.md
}
- Matt Mueller (@mattmueller)
MIT