(name string, excludePatterns []string)
| 411 | } |
| 412 | |
| 413 | func matchesAny(name string, excludePatterns []string) bool { |
| 414 | for _, p := range excludePatterns { |
| 415 | if matched, _ := path.Match(p, name); matched { |
| 416 | return true |
| 417 | } |
| 418 | // Also match against the basename so "*.yml" matches "dir/file.yml" |
| 419 | if matched, _ := path.Match(p, path.Base(name)); matched { |
| 420 | return true |
| 421 | } |
| 422 | } |
| 423 | return false |
| 424 | } |