(name string, excludePatterns []string)
| 437 | } |
| 438 | |
| 439 | func matchesAny(name string, excludePatterns []string) bool { |
| 440 | for _, p := range excludePatterns { |
| 441 | if matched, _ := path.Match(p, name); matched { |
| 442 | return true |
| 443 | } |
| 444 | // Also match against the basename so "*.yml" matches "dir/file.yml" |
| 445 | if matched, _ := path.Match(p, path.Base(name)); matched { |
| 446 | return true |
| 447 | } |
| 448 | } |
| 449 | return false |
| 450 | } |