Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit e20956c

Browse files
authored
Merge pull request #1395 from cjellick/goimports
Add goimports to lint check
2 parents 2f1dc3b + 2102449 commit e20956c

File tree

15 files changed

+35
-28
lines changed

15 files changed

+35
-28
lines changed

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ linters:
1919
- typecheck
2020
- thelper
2121
- unused
22+
- goimports
2223
fast: false
24+
max-same-issues: 50

integration/client/info/info_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package info_test
22

33
import (
4+
"testing"
5+
"time"
6+
47
"github.com/acorn-io/acorn/integration/helper"
58
v1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
69
"github.com/acorn-io/acorn/pkg/client"
710
"github.com/acorn-io/acorn/pkg/config"
811
kclient "github.com/acorn-io/acorn/pkg/k8sclient"
912
"github.com/acorn-io/acorn/pkg/project"
1013
"github.com/stretchr/testify/assert"
11-
"testing"
12-
"time"
1314
)
1415

1516
func TestDefaultClientInfoOneNamespace(t *testing.T) {

integration/log/log_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ package log
22

33
import (
44
"context"
5+
"sort"
6+
"strings"
7+
"testing"
8+
59
"github.com/acorn-io/acorn/integration/helper"
610
apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
711
v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
812
"github.com/acorn-io/acorn/pkg/client"
913
"github.com/sirupsen/logrus"
1014
"github.com/stretchr/testify/assert"
11-
"sort"
12-
"strings"
13-
"testing"
1415
)
1516

1617
const sampleLog = `line 1-1

pkg/cli/containers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cli
22

33
import (
44
"context"
5+
56
cli "github.com/acorn-io/acorn/pkg/cli/builder"
67
"github.com/acorn-io/acorn/pkg/cli/builder/table"
78
"github.com/acorn-io/acorn/pkg/client"

pkg/cli/containers_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ package cli
22

33
import (
44
"fmt"
5-
apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
6-
v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
7-
"github.com/acorn-io/acorn/pkg/client"
8-
"github.com/acorn-io/acorn/pkg/mocks"
9-
"github.com/golang/mock/gomock"
105
"io"
11-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
126
"os"
137
"strings"
148
"testing"
159
"time"
1610

11+
apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
12+
v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
1713
"github.com/acorn-io/acorn/pkg/cli/testdata"
14+
"github.com/acorn-io/acorn/pkg/client"
15+
"github.com/acorn-io/acorn/pkg/mocks"
16+
"github.com/golang/mock/gomock"
1817
"github.com/spf13/cobra"
1918
"github.com/stretchr/testify/assert"
19+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2020
)
2121

2222
var (

pkg/cli/info_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
package cli
22

33
import (
4-
apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
5-
"github.com/acorn-io/acorn/pkg/mocks"
64
"io"
7-
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
85
"os"
96
"strings"
107
"testing"
118

9+
apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
1210
"github.com/acorn-io/acorn/pkg/cli/testdata"
11+
"github.com/acorn-io/acorn/pkg/mocks"
1312
"github.com/golang/mock/gomock"
1413
"github.com/spf13/cobra"
1514
"github.com/stretchr/testify/assert"
15+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1616
)
1717

1818
func TestInfo(t *testing.T) {

pkg/controller/appdefinition/deploy_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package appdefinition
22

33
import (
44
"encoding/base64"
5-
"github.com/acorn-io/acorn/pkg/digest"
6-
"github.com/acorn-io/acorn/pkg/secrets"
75
"testing"
86

97
v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
108
"github.com/acorn-io/acorn/pkg/controller/namespace"
9+
"github.com/acorn-io/acorn/pkg/digest"
1110
"github.com/acorn-io/acorn/pkg/scheme"
11+
"github.com/acorn-io/acorn/pkg/secrets"
1212
"github.com/acorn-io/baaah/pkg/router"
1313
"github.com/acorn-io/baaah/pkg/router/tester"
1414
"github.com/google/go-containerregistry/pkg/name"

pkg/controller/appdefinition/volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package appdefinition
22

33
import (
44
"fmt"
5-
"github.com/acorn-io/acorn/pkg/secrets"
65
"sort"
76
"strconv"
87
"strings"
98

109
v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
1110
"github.com/acorn-io/acorn/pkg/labels"
11+
"github.com/acorn-io/acorn/pkg/secrets"
1212
"github.com/acorn-io/acorn/pkg/volume"
1313
"github.com/acorn-io/baaah/pkg/router"
1414
"github.com/acorn-io/baaah/pkg/typed"

pkg/controller/routes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package controller
22

33
import (
4-
policyv1 "k8s.io/api/policy/v1"
54
"net/http"
65

76
v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
@@ -26,6 +25,7 @@ import (
2625
appsv1 "k8s.io/api/apps/v1"
2726
corev1 "k8s.io/api/core/v1"
2827
netv1 "k8s.io/api/networking/v1"
28+
policyv1 "k8s.io/api/policy/v1"
2929
rbacv1 "k8s.io/api/rbac/v1"
3030
storagev1 "k8s.io/api/storage/v1"
3131
klabels "k8s.io/apimachinery/pkg/labels"

pkg/controller/secrets/secret_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package secrets
22

33
import (
4+
"regexp"
5+
"strings"
46
"testing"
57

68
v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
@@ -10,8 +12,6 @@ import (
1012
"github.com/stretchr/testify/assert"
1113
corev1 "k8s.io/api/core/v1"
1214
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13-
"regexp"
14-
"strings"
1515
)
1616

1717
func TestSecretImageReference(t *testing.T) {

0 commit comments

Comments
 (0)