mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
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:
committed by
Marwan Sulaiman
parent
ea96158f8f
commit
ec2748ecc3
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user