matthewmueller / glob

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Go 94.3%Language:Makefile 5.7%