From 6190b1ba051ef06590b4bcb184c28e032d67b64e Mon Sep 17 00:00:00 2001 From: Keepers Date: Fri, 31 Mar 2023 10:36:19 -0600 Subject: [PATCH] use equalfold in filter equals checks (#2995) Because it's nifty. ----- #### Type of change - [x] :broom: Tech Debt/Cleanup --- src/internal/operations/backup_integration_test.go | 1 - src/pkg/filters/filters.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/internal/operations/backup_integration_test.go b/src/internal/operations/backup_integration_test.go index 744a87837..2de42ee31 100644 --- a/src/internal/operations/backup_integration_test.go +++ b/src/internal/operations/backup_integration_test.go @@ -1098,7 +1098,6 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() { } for _, test := range table { suite.Run(test.name, func() { - fmt.Printf("\n-----\ntest %+v\n-----\n", test.name) var ( t = suite.T() incMB = evmock.NewBus() diff --git a/src/pkg/filters/filters.go b/src/pkg/filters/filters.go index 8a2504f27..e05134592 100644 --- a/src/pkg/filters/filters.go +++ b/src/pkg/filters/filters.go @@ -444,7 +444,7 @@ func (f Filter) Compare(input string) bool { // true if t == i func equals(target, input string) bool { - return target == input + return strings.EqualFold(target, input) } // true if t > i @@ -531,7 +531,7 @@ func pathSuffix(target, input string) bool { // The input is assumed to be the complete path that may // match the target. func pathEquals(target, input string) bool { - return normPathElem(input) == target + return strings.EqualFold(normPathElem(input), target) } // ----------------------------------------------------------------------------------------------------