Skip to content

Glob utilities built on top of the well-tested gobwas/glob

License

Notifications You must be signed in to change notification settings

matthewmueller/glob

Repository files navigation

glob

Go Reference

Glob utilities built on top of the well-tested gobwas/glob.

Features

  • 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.

Install

go get github.com/matthewmueller/glob

Example

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
}

Contributors

License

MIT

About

Glob utilities built on top of the well-tested gobwas/glob

Resources

License

Stars

Watchers

Forks

Packages

No packages published