1[![Build Status][travis-image]][travis-url]
2[![GoDoc][godoc-image]][godoc-url]
3[![GitHub release][release-image]][release-url]
4
5# xignore
6
7A golang package for pattern matching of file paths. Like gitignore, dockerignore chefignore.
8
9
10## Requirements
11
12* Golang ≥ 1.11
13
14
15## Use
16
17```golang
18result := xignore.DirMatches("/workspace/my_project", &MatchesOptions{
19	Ignorefile: ".gitignore",
20	Nested: true, // Handle nested ignorefile
21})
22
23// ignorefile rules matched files
24fmt.Printf("%#v\n", result.MatchedFiles)
25// ignorefile rules unmatched files
26fmt.Printf("%#v\n", result.UnmatchedFiles)
27// ignorefile rules matched dirs
28fmt.Printf("%#v\n", result.MatchedDirs)
29// ignorefile rules unmatched dirs
30fmt.Printf("%#v\n", result.UnmatchedDirs)
31```
32
33
34## LICENSE
35[MIT](https://github.com/zealic/xignore/blob/master/LICENSE.txt)
36
37
38## Reference
39
40* https://git-scm.com/docs/gitignore
41* https://github.com/moby/moby/blob/master/pkg/fileutils/fileutils.go
42
43[travis-image]: https://travis-ci.org/zealic/xignore.svg
44[travis-url]:   https://travis-ci.org/zealic/xignore
45[godoc-image]:  https://godoc.org/github.com/zealic/xignore?status.svg
46[godoc-url]:    https://godoc.org/github.com/zealic/xignore
47[release-image]: https://img.shields.io/github/release/zealic/xignore.svg
48[release-url]:   https://github.com/zealic/go2node/releases/xignore
49