From 1620f1d6a98fe5ad6b29cee16ade58b1511d3b84 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 11 Feb 2026 18:57:35 +0100 Subject: [PATCH] refactor(test): use strings.Contains directly instead of wrapper Remove the custom contains() wrapper function in params_test.go and use strings.Contains directly as suggested in review. Co-Authored-By: Claude Opus 4.6 --- pkg/params/params_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/params/params_test.go b/pkg/params/params_test.go index 050bc98..3077691 100644 --- a/pkg/params/params_test.go +++ b/pkg/params/params_test.go @@ -87,7 +87,7 @@ func TestGetIndex(t *testing.T) { t.Errorf("GetIndex() expected error but got nil") return } - if tt.errMsg != "" && !contains(err.Error(), tt.errMsg) { + if tt.errMsg != "" && !strings.Contains(err.Error(), tt.errMsg) { t.Errorf("GetIndex() error = %v, want error containing %q", err, tt.errMsg) } return @@ -102,7 +102,3 @@ func TestGetIndex(t *testing.T) { }) } } - -func contains(s, substr string) bool { - return strings.Contains(s, substr) -}