Merge branch 'enable-goimports' into 'master'

Enable goimports.

See merge request slon/shad-go-private!70
This commit is contained in:
verytable 2022-04-18 12:44:04 +00:00
commit 9913a9386e
20 changed files with 23 additions and 3 deletions

View file

@ -39,7 +39,7 @@ linters-settings:
goimports: goimports:
# put imports beginning with prefix after 3rd-party packages; # put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes # it's a comma-separated list of prefixes
local-prefixes: gitlab.com local-prefixes: gitlab.com/slon/shad-go
stylecheck: stylecheck:
# https://staticcheck.io/docs/options#checks # https://staticcheck.io/docs/options#checks
checks: ["all", "-ST1018"] checks: ["all", "-ST1018"]
@ -56,6 +56,7 @@ linters:
enable: enable:
- errcheck - errcheck
- gofmt - gofmt
- goimports
- stylecheck - stylecheck
- gosimple - gosimple
- govet - govet

View file

@ -7,6 +7,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/blowfish" "gitlab.com/slon/shad-go/blowfish"
) )

View file

@ -7,6 +7,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/pgfixture" "gitlab.com/slon/shad-go/pgfixture"
) )

View file

@ -17,6 +17,7 @@ import (
"time" "time"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -11,6 +11,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -16,6 +16,7 @@ import (
"time" "time"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -7,8 +7,9 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/genericsum"
"go.uber.org/goleak" "go.uber.org/goleak"
"gitlab.com/slon/shad-go/genericsum"
) )
func TestMin(t *testing.T) { func TestMin(t *testing.T) {

View file

@ -4,6 +4,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"gitlab.com/slon/shad-go/illegal" "gitlab.com/slon/shad-go/illegal"
"gitlab.com/slon/shad-go/illegal/internal" "gitlab.com/slon/shad-go/illegal/internal"
) )

View file

@ -5,6 +5,7 @@ import (
"unsafe" "unsafe"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"gitlab.com/slon/shad-go/illegal" "gitlab.com/slon/shad-go/illegal"
) )

View file

@ -9,6 +9,7 @@ import (
"time" "time"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/ledger" "gitlab.com/slon/shad-go/ledger"
"gitlab.com/slon/shad-go/pgfixture" "gitlab.com/slon/shad-go/pgfixture"
) )

View file

@ -15,6 +15,7 @@ import (
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -10,6 +10,7 @@ import (
"time" "time"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -6,6 +6,7 @@ import (
"github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/pgfixture" "gitlab.com/slon/shad-go/pgfixture"
) )

View file

@ -6,6 +6,7 @@ import (
"time" "time"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -6,6 +6,7 @@ import (
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/shopfront" "gitlab.com/slon/shad-go/shopfront"
) )

View file

@ -8,8 +8,9 @@ import (
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/distbuild/pkg/tarstream"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
"gitlab.com/slon/shad-go/distbuild/pkg/tarstream"
) )
func TestTarStream(t *testing.T) { func TestTarStream(t *testing.T) {

View file

@ -4,6 +4,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"gitlab.com/slon/shad-go/treeiter" "gitlab.com/slon/shad-go/treeiter"
) )

View file

@ -14,6 +14,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -13,6 +13,7 @@ import (
"github.com/go-resty/resty/v2" "github.com/go-resty/resty/v2"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )

View file

@ -14,6 +14,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/slon/shad-go/tools/testtool" "gitlab.com/slon/shad-go/tools/testtool"
) )