Add golangci-lint workflow (#4999)

* fix lint workflow

* add golang lint

* close http response body
This commit is contained in:
andrew_li
2022-06-29 11:58:36 +08:00
committed by GitHub
parent f1e06466df
commit f289795312
141 changed files with 311 additions and 592 deletions

View File

@@ -55,9 +55,6 @@ var (
v2beta1.AddToScheme(scheme.Scheme)
apis.AddToScheme(scheme.Scheme)
const timeout = time.Second * 30
const interval = time.Second * 1
secret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
@@ -100,6 +97,7 @@ var (
)
BeforeEach(func() {
k8sClient = fakek8s.NewSimpleClientset()
//nolint:staticcheck
cl = fake.NewFakeClientWithScheme(scheme.Scheme)
informerCacheCtx = context.TODO()
ksCache = &fakeCache{