glob

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

MIT License

Stars
0

glob

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

Package Rankings
Top 9.25% on Proxy.golang.org
Badges
Extracted from project README
Go Reference