• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

testdata/H30-Mar-2019-

.travis.ymlH A D30-Mar-201985

MakefileH A D30-Mar-201956

README.mdH A D30-Mar-20191.3 KiB

go.modH A D30-Mar-2019113

go.sumH A D30-Mar-2019924

ignorefile.goH A D30-Mar-20191.5 KiB

matcher.goH A D30-Mar-20192.4 KiB

matcher_test.goH A D30-Mar-20195.8 KiB

pattern.goH A D30-Mar-20194.8 KiB

statemap.goH A D30-Mar-20193 KiB

xignore.goH A D30-Mar-2019848

README.md

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