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 <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-02-11 18:57:35 +01:00
parent b8630b5b9a
commit 1620f1d6a9

View File

@@ -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)
}