diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-04-22 21:25:06 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-04-22 21:25:51 +0300 |
commit | 64fa922ec013079f8f0c90fc9e93c56db3611d30 (patch) | |
tree | 7bb9b40f57b8368ef0f5eeccea02d80e54796927 /vendor/github.com/zyedidia/glob/README.md | |
parent | bfb5f0dd457be326b1ae7638a64d2e79cbace371 (diff) |
Switch to dep
Diffstat (limited to 'vendor/github.com/zyedidia/glob/README.md')
-rw-r--r-- | vendor/github.com/zyedidia/glob/README.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/github.com/zyedidia/glob/README.md b/vendor/github.com/zyedidia/glob/README.md new file mode 100644 index 0000000..e2e6c64 --- /dev/null +++ b/vendor/github.com/zyedidia/glob/README.md @@ -0,0 +1,28 @@ +# String globbing in Go + +[![GoDoc](https://godoc.org/github.com/zyedidia/glob?status.svg)](http://godoc.org/github.com/zyedidia/glob) + +This package adds support for globs in Go. + +It simply converts glob expressions to regexps. I try to follow the standard defined [here](http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13). + +# Example + +```go +package main + +import "github.com/zyedidia/glob" + +func main() { + glob, err := glob.Compile("{*.go,*.c}") + if err != nil { + // Error + } + + glob.Match([]byte("test.c")) // true + glob.Match([]byte("hello.go")) // true + glob.Match([]byte("test.d")) // false +} +``` + +You can call all the same functions on a glob that you can call on a regexp. |