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