INNER CODE UNIT · Go
glob
xataio/xata · gen/aiconfigs/main.go:307
func glob(pattern string, ignorePatterns []string) ([]string, error) {
matches, err := doublestar.FilepathGlob(pattern, doublestar.WithFailOnIOErrors())
if err != nil {
return nil, err
}
filteredMatches := matches[:0]
for _, match := range matches {
shouldIgnore := false
for _, pattern := range ignorePatterns {
if doublestar.MatchUnvalidated(pattern, match) {
shouldIgnore = true
break
}
}
if !shouldIgnore {
filteredMatches = append(filteredMatches, match)
}