MCPcopy Create free account
hub / github.com/cli/cli / matchesAny

Function matchesAny

pkg/cmd/pr/diff/diff.go:413–424  ·  view source on GitHub ↗
(name string, excludePatterns []string)

Source from the content-addressed store, hash-verified

411}
412
413func 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}

Callers 2

filterDiffFunction · 0.85
Test_matchesAnyFunction · 0.85

Calls 1

BaseMethod · 0.80

Tested by 1

Test_matchesAnyFunction · 0.68