From ff471cd5dd9cfd4de0abf457c00e08479924959a Mon Sep 17 00:00:00 2001 From: Kharec Date: Fri, 21 Nov 2025 15:39:08 +0100 Subject: [PATCH] fix: loop --- cmd/goyco/commands/seed_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/goyco/commands/seed_test.go b/cmd/goyco/commands/seed_test.go index cdc7cd6..0a94198 100644 --- a/cmd/goyco/commands/seed_test.go +++ b/cmd/goyco/commands/seed_test.go @@ -5,11 +5,12 @@ import ( "strings" "testing" - "gorm.io/driver/sqlite" - "gorm.io/gorm" "goyco/internal/database" "goyco/internal/repositories" "goyco/internal/testutils" + + "gorm.io/driver/sqlite" + "gorm.io/gorm" ) func TestSeedCommand(t *testing.T) { @@ -295,7 +296,7 @@ func TestSeedCommandIdempotency(t *testing.T) { }) t.Run("database remains consistent after multiple runs", func(t *testing.T) { - for i := 0; i < 2; i++ { + for i := range 2 { err := seedDatabase(userRepo, postRepo, voteRepo, []string{"--users", "0", "--posts", "1"}) if err != nil { t.Fatalf("Seed run %d failed: %v", i+1, err)