Skip to content

Commit

Permalink
fix(lint): Fix new lint errors (#812)
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
  • Loading branch information
hairyhenderson authored Sep 20, 2024
1 parent 315727b commit a936a91
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ linters:
- errcheck
- errorlint
- exhaustive
- exportloopref
- fatcontext
- funlen
- gci
Expand Down
4 changes: 3 additions & 1 deletion consulfs/consul_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion vaultfs/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 3 additions & 1 deletion vaultfs/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a936a91

Please sign in to comment.