mirror of https://github.com/spf13/afero.git
match: change strings.IndexAny to strings.ContainsAny
This commit is contained in:
parent
a5d6946387
commit
617d93fa6d
2
match.go
2
match.go
|
@ -106,5 +106,5 @@ func glob(fs Fs, dir, pattern string, matches []string) (m []string, e error) {
|
||||||
// recognized by Match.
|
// recognized by Match.
|
||||||
func hasMeta(path string) bool {
|
func hasMeta(path string) bool {
|
||||||
// TODO(niemeyer): Should other magic characters be added here?
|
// TODO(niemeyer): Should other magic characters be added here?
|
||||||
return strings.IndexAny(path, "*?[") >= 0
|
return strings.ContainsAny(path, "*?[")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue