Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Dec 20, 2024
1 parent 91834d9 commit 1885abc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/fanal/image/daemon/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (img *image) imageConfig(config *container.Config) v1.Config {
}

if len(config.ExposedPorts) > 0 {
c.ExposedPorts = make(map[string]struct{})
c.ExposedPorts = make(map[string]struct{}) //nolint: gocritic
for port := range config.ExposedPorts {
c.ExposedPorts[port.Port()] = struct{}{}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/set/unsafe.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

// unsafeSet represents a non-thread-safe set implementation
// WARNING: This implementation is not thread-safe
type unsafeSet[T comparable] map[T]struct{}
type unsafeSet[T comparable] map[T]struct{} //nolint: gocritic

// New creates a new empty non-thread-safe set with optional initial values
func New[T comparable](values ...T) Set[T] {
Expand Down
2 changes: 1 addition & 1 deletion pkg/set/unsafe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func Test_unsafeSet_Clear(t *testing.T) {

got := s.Size()
assert.Zero(t, got, "unexpected set size")
assert.Equal(t, 0, len(s.Items()), "items should be empty")
assert.Empty(t, s.Items(), "items should be empty")
})
}
}
Expand Down

0 comments on commit 1885abc

Please sign in to comment.