Skip to content

Commit

Permalink
fix: Expose IsExclusionOnlyPatterns
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Jan 28, 2025
1 parent fc7274b commit 20d250d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collections/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func MatchItems(item string, patterns ...string) bool {

//nolint:gosimple
//lint:ignore S1008 ...
if allExclusions(patterns) {
if IsExclusionOnlyPatterns(patterns) {
// If all the filters were exlusions, and none of the exclusions excluded the item, then it's a match
return true
}
Expand Down Expand Up @@ -153,7 +153,7 @@ func sortPatterns(a, b string) int {
return 0
}

func allExclusions(patterns []string) bool {
func IsExclusionOnlyPatterns(patterns []string) bool {
if len(patterns) == 0 {
return false
}
Expand Down

0 comments on commit 20d250d

Please sign in to comment.