diff --git a/.golangci.yml b/.golangci.yml index 2aed1988..d58cdb9b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -33,7 +33,6 @@ linters: - errcheck - errorlint - exhaustive - - exportloopref - fatcontext - funlen - gci diff --git a/consulfs/consul_test.go b/consulfs/consul_test.go index ff90a524..98794cd7 100644 --- a/consulfs/consul_test.go +++ b/consulfs/consul_test.go @@ -159,7 +159,9 @@ func TestNew(t *testing.T) { } func TestWithContext(t *testing.T) { - ctx := context.WithValue(context.Background(), struct{}{}, "foo") + type key struct{} + + ctx := context.WithValue(context.Background(), key{}, "foo") fsys := &consulFS{ctx: context.Background()} fsys = fsys.WithContext(ctx).(*consulFS) diff --git a/vaultfs/vault.go b/vaultfs/vault.go index 45382bf4..f361ee2f 100644 --- a/vaultfs/vault.go +++ b/vaultfs/vault.go @@ -486,7 +486,7 @@ func (f *vaultFile) list() ([]string, error) { dirkeys := make([]string, len(k)) - for i := range len(k) { + for i := range k { if s, ok := k[i].(string); ok { dirkeys[i] = s } diff --git a/vaultfs/vault_test.go b/vaultfs/vault_test.go index 9f548908..becc1f06 100644 --- a/vaultfs/vault_test.go +++ b/vaultfs/vault_test.go @@ -84,7 +84,9 @@ func TestNew(t *testing.T) { } func TestWithContext(t *testing.T) { - ctx := context.WithValue(context.Background(), struct{}{}, "foo") + type key struct{} + + ctx := context.WithValue(context.Background(), key{}, "foo") fsys := &vaultFS{ctx: context.Background()} fsys = fsys.WithContext(ctx).(*vaultFS)