Remove unused file in pkg/module and clean up dependencies (#625)

* pkg/module: Remove unused file parser.go

PR #618 removed the last remaining user of the functions/types defined
in parser.go

* go.mod: update

The last user of github.com/sabhiram/go-gitignore was removed. Run 'go
mod tidy' to remove the dependency.

* vendor: remove unused dependency

The last user of github.com/sabhiram/go-gitignore was removed. Remove
the vendored copy as well by running 'go mod vendor'.
This commit is contained in:
Tobias Klauser
2018-09-07 08:04:23 +02:00
committed by Marwan Sulaiman
parent ea96158f8f
commit ec2748ecc3
10 changed files with 0 additions and 363 deletions
-40
View File
@@ -1,40 +0,0 @@
package module
import (
"strings"
ignore "github.com/sabhiram/go-gitignore"
)
type multiIgnoreParser struct {
parsers []ignore.IgnoreParser
}
// Returns map of patterns for more performant searches
func newMultiIgnoreParser(parsers ...ignore.IgnoreParser) ignore.IgnoreParser {
parser := multiIgnoreParser{}
for _, p := range parsers {
if p != nil {
parser.parsers = append(parser.parsers, p)
}
}
return parser
}
func (p multiIgnoreParser) MatchesPath(f string) bool {
for _, parser := range p.parsers {
if parser.MatchesPath(f) {
return true
}
}
return false
}
type dsStoreIgnoreParser struct{}
func (p dsStoreIgnoreParser) MatchesPath(f string) bool {
return strings.Contains(f, "/.DS_Store")
}