Skip to content

nxtgo/golb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golb

glob pattern handling for go.

example

package main

import (
	"fmt"
	"github.com/nxtgo/golb"
)

func main() {
	pattern := "**/{readme,license}.md"
	files := []string{
		"readme.md",
		"docs/readme.md",
		"license.md",
		"src/license.txt",
	}

	for _, f := range files {
		if golb.Match(pattern, f, '/') {
			fmt.Println("matched:", f)
		}
	}
}
matched: readme.md
matched: docs/readme.md
matched: license.md

license

under CC0 1.0 (public domain) + ip waiver.

About

glob handling for go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published