Skip to content

Commit 67d3cfe

Browse files
Kiran01bmclaude
andcommitted
address feedback
Co-authored-by: Claude Code <noreply@anthropic.com> Ai-assisted: true
1 parent ccb4e81 commit 67d3cfe

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

pkg/eol/endoflife/provider_test.go

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package endoflife
22

33
import (
44
"context"
5+
"strings"
56
"testing"
67
"time"
78

@@ -349,7 +350,7 @@ func TestProvider_BlocksNonStandardSchema(t *testing.T) {
349350
if err == nil {
350351
t.Errorf("Expected error for %s (non-standard schema), got nil", engine)
351352
}
352-
if err != nil && !contains(err.Error(), "non-standard") {
353+
if err != nil && !strings.Contains(err.Error(), "non-standard") {
353354
t.Errorf("Error should mention 'non-standard schema', got: %v", err)
354355
}
355356

@@ -362,20 +363,6 @@ func TestProvider_BlocksNonStandardSchema(t *testing.T) {
362363
}
363364
}
364365

365-
// Helper function for string contains
366-
func contains(s, substr string) bool {
367-
return len(s) >= len(substr) && (s == substr || substr == "" ||
368-
(s != "" && substr != "" && indexOfSubstring(s, substr) >= 0))
369-
}
370-
371-
func indexOfSubstring(s, substr string) int {
372-
for i := 0; i <= len(s)-len(substr); i++ {
373-
if s[i:i+len(substr)] == substr {
374-
return i
375-
}
376-
}
377-
return -1
378-
}
379366

380367
func TestConvertCycle_ExtendedSupport(t *testing.T) {
381368
provider := NewProvider(&MockClient{}, 1*time.Hour)

0 commit comments

Comments
 (0)