Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lint): enable goimports linter #1078

Merged
merged 4 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
with:
filters: |
go:
- '.golangci.yml'
- '.github/workflows/**/*.yml'
- '**/*.go'
- '**/*.gotpl'
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ linters:
- revive
- exportloopref
- gocritic
- goimports
5 changes: 3 additions & 2 deletions binaries/binaries.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
3 changes: 1 addition & 2 deletions engine/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/steebchen/prisma-client-go/generator"
"log"
"os"
"os/exec"
Expand All @@ -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"
)

Expand Down
1 change: 1 addition & 0 deletions engine/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"

"github.com/steebchen/prisma-client-go/logger"
)

Expand Down
2 changes: 1 addition & 1 deletion generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package generator

import (
"encoding/json"
"github.com/steebchen/prisma-client-go/logger"
"os"
"path"
"strings"

"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.
Expand Down
2 changes: 1 addition & 1 deletion test/databases/sqlite/checks_nested/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"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"
)

Expand Down
2 changes: 1 addition & 1 deletion test/features/composite_id/composite_id_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/misc/config/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading