From 5f381f57b1632bebf41bd94cb020b4cb8bb962ea Mon Sep 17 00:00:00 2001 From: steebchen Date: Sun, 5 Nov 2023 20:53:20 +0900 Subject: [PATCH] lint fixes --- binaries/binaries.go | 5 +++-- cli/cli.go | 2 +- engine/lifecycle.go | 3 +-- engine/transform.go | 1 + generator/generator.go | 2 +- test/databases/sqlite/checks_nested/default_test.go | 5 +++-- test/databases/sqlite/checks_path/default_test.go | 2 +- test/features/composite_id/composite_id_test.go | 2 +- test/misc/config/default_test.go | 2 +- 9 files changed, 13 insertions(+), 11 deletions(-) diff --git a/binaries/binaries.go b/binaries/binaries.go index efcab380..796ad0d4 100644 --- a/binaries/binaries.go +++ b/binaries/binaries.go @@ -3,14 +3,15 @@ package binaries import ( "compress/gzip" "fmt" - "github.com/steebchen/prisma-client-go/binaries/platform" - "github.com/steebchen/prisma-client-go/logger" "io" "log" "net/http" "os" "path" "path/filepath" + + "github.com/steebchen/prisma-client-go/binaries/platform" + "github.com/steebchen/prisma-client-go/logger" ) // PrismaVersion is a hardcoded version of the Prisma CLI. diff --git a/cli/cli.go b/cli/cli.go index 66eb7810..e40d82e5 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -2,12 +2,12 @@ package cli import ( "fmt" - "github.com/steebchen/prisma-client-go/binaries/platform" "os" "os/exec" "path" "github.com/steebchen/prisma-client-go/binaries" + "github.com/steebchen/prisma-client-go/binaries/platform" "github.com/steebchen/prisma-client-go/logger" ) diff --git a/engine/lifecycle.go b/engine/lifecycle.go index ced179fa..94bb2b94 100644 --- a/engine/lifecycle.go +++ b/engine/lifecycle.go @@ -5,7 +5,6 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/steebchen/prisma-client-go/generator" "log" "os" "os/exec" @@ -15,10 +14,10 @@ import ( "time" "github.com/joho/godotenv" - "github.com/steebchen/prisma-client-go/binaries" "github.com/steebchen/prisma-client-go/binaries/platform" "github.com/steebchen/prisma-client-go/binaries/unpack" + "github.com/steebchen/prisma-client-go/generator" "github.com/steebchen/prisma-client-go/logger" ) diff --git a/engine/transform.go b/engine/transform.go index e3c4d5bf..576ded82 100644 --- a/engine/transform.go +++ b/engine/transform.go @@ -4,6 +4,7 @@ import ( "encoding/base64" "encoding/json" "fmt" + "github.com/steebchen/prisma-client-go/logger" ) diff --git a/generator/generator.go b/generator/generator.go index 749989f7..73a55573 100644 --- a/generator/generator.go +++ b/generator/generator.go @@ -2,7 +2,6 @@ package generator import ( "encoding/json" - "github.com/steebchen/prisma-client-go/logger" "os" "path" "strings" @@ -10,6 +9,7 @@ import ( "github.com/steebchen/prisma-client-go/generator/ast/dmmf" "github.com/steebchen/prisma-client-go/generator/ast/transform" "github.com/steebchen/prisma-client-go/generator/types" + "github.com/steebchen/prisma-client-go/logger" ) // Root describes the generator output root. diff --git a/test/databases/sqlite/checks_nested/default_test.go b/test/databases/sqlite/checks_nested/default_test.go index 2bd0d760..d4d28731 100644 --- a/test/databases/sqlite/checks_nested/default_test.go +++ b/test/databases/sqlite/checks_nested/default_test.go @@ -2,10 +2,11 @@ package raw import ( "context" + "testing" + "github.com/steebchen/prisma-client-go/test" - "github.com/steebchen/prisma-client-go/test/databases/sqlite/checks_nested/prisma" + db "github.com/steebchen/prisma-client-go/test/databases/sqlite/checks_nested/prisma" "github.com/stretchr/testify/assert" - "testing" ) type cx = context.Context diff --git a/test/databases/sqlite/checks_path/default_test.go b/test/databases/sqlite/checks_path/default_test.go index 0785ae7d..4354c394 100644 --- a/test/databases/sqlite/checks_path/default_test.go +++ b/test/databases/sqlite/checks_path/default_test.go @@ -2,10 +2,10 @@ package db import ( "context" - "github.com/stretchr/testify/assert" "testing" "github.com/steebchen/prisma-client-go/test" + "github.com/stretchr/testify/assert" ) type cx = context.Context diff --git a/test/features/composite_id/composite_id_test.go b/test/features/composite_id/composite_id_test.go index f1973f72..f21f8229 100644 --- a/test/features/composite_id/composite_id_test.go +++ b/test/features/composite_id/composite_id_test.go @@ -2,10 +2,10 @@ package db import ( "context" - "github.com/stretchr/testify/assert" "testing" "github.com/steebchen/prisma-client-go/test" + "github.com/stretchr/testify/assert" ) type cx = context.Context diff --git a/test/misc/config/default_test.go b/test/misc/config/default_test.go index 9e032b87..3ce391bd 100644 --- a/test/misc/config/default_test.go +++ b/test/misc/config/default_test.go @@ -2,10 +2,10 @@ package raw import ( "context" - "github.com/stretchr/testify/assert" "testing" "github.com/steebchen/prisma-client-go/test" + "github.com/stretchr/testify/assert" ) func TestConfig(t *testing.T) {