Skip to content

Commit 5fa983a

Browse files
committed
Orgainze imports with goimports
Replate by running: go install golang.org/x/tools/cmd/goimports@latest goimports -format-only -w ./ Signed-off-by: Micah Hausler <[email protected]>
1 parent a97a25a commit 5fa983a

File tree

7 files changed

+20
-6
lines changed

7 files changed

+20
-6
lines changed

.github/workflows/go.yml

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ jobs:
1919
echo "Please format Go code by running: go fmt ./..."
2020
exit 1
2121
fi
22+
- name: Go import lint
23+
run: |
24+
go install golang.org/x/tools/cmd/goimports@latest
25+
if [ "$(goimports -d . | wc -l)" -gt 0 ]; then
26+
goimports -d .
27+
echo "Please format Go code by running: goimports -w ./"
28+
exit 1
29+
fi
2230
- name: Build
2331
run: go build -v ./...
2432
- name: Test

auth/auth.go

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ package auth
99

1010
import (
1111
"context"
12+
1213
"github.com/aws/aws-sdk-go/aws"
1314
"github.com/aws/aws-sdk-go/aws/endpoints"
1415
"github.com/aws/aws-sdk-go/aws/request"

credential_provider/credential_provider_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package credential_provider
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/aws/aws-sdk-go/service/sts/stsiface"
78
authv1 "k8s.io/api/authentication/v1"
89
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

credential_provider/irsa_credential_provider.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package credential_provider
33
import (
44
"context"
55
"fmt"
6+
67
"github.com/aws/aws-sdk-go/aws"
78
"github.com/aws/aws-sdk-go/aws/credentials"
89
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"

credential_provider/irsa_credential_provider_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package credential_provider
22

33
import (
4+
"strings"
5+
"testing"
6+
47
corev1 "k8s.io/api/core/v1"
58
"k8s.io/client-go/kubernetes/fake"
69
k8sv1 "k8s.io/client-go/kubernetes/typed/core/v1"
7-
"strings"
8-
"testing"
910
)
1011

1112
const (

credential_provider/pod_identity_credential_provider.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7+
"io"
8+
"net/http"
9+
"strings"
10+
"time"
11+
712
"github.com/aws/aws-sdk-go/aws"
813
"github.com/aws/aws-sdk-go/aws/credentials"
9-
"io"
1014
authv1 "k8s.io/api/authentication/v1"
1115
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1216
k8sv1 "k8s.io/client-go/kubernetes/typed/core/v1"
1317
"k8s.io/klog/v2"
14-
"net/http"
15-
"strings"
16-
"time"
1718
)
1819

1920
const (

provider/secret_value.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package provider
33
import (
44
"encoding/json"
55
"fmt"
6+
67
"github.com/jmespath/go-jmespath"
78
)
89

0 commit comments

Comments
 (0)