Skip to content

Commit 1298c20

Browse files
committed
Lint: staticcheck fix ST1005
Signed-off-by: apostasie <[email protected]>
1 parent a46718f commit 1298c20

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ linters:
5656
- "-QF1003" # Convert if/else-if chain to tagged switch https://staticcheck.dev/docs/checks#QF1003
5757
- "-QF1001" # Apply De Morgan’s law https://staticcheck.dev/docs/checks#QF1001
5858
- "-QF1012" # Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...)) https://staticcheck.dev/docs/checks#QF1012
59-
- "-ST1005" # Expand call to math.Pow https://staticcheck.dev/docs/checks#QF1005
6059
revive:
6160
enable-all-rules: true
6261
rules:

pkg/imgutil/filtering.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ func FilterByCreatedAt(ctx context.Context, client *containerd.Client, before []
158158
return []images.Image{}, err
159159
}
160160
if len(beforeImages) == 0 {
161-
//nolint:stylecheck
162-
return []images.Image{}, fmt.Errorf("No such image: %s", fetchImageNames(before))
161+
return []images.Image{}, fmt.Errorf("no such image: %s", fetchImageNames(before))
163162
}
164163
maxTime = beforeImages[0].CreatedAt
165164
for _, image := range beforeImages {
@@ -175,8 +174,7 @@ func FilterByCreatedAt(ctx context.Context, client *containerd.Client, before []
175174
return []images.Image{}, err
176175
}
177176
if len(sinceImages) == 0 {
178-
//nolint:stylecheck
179-
return []images.Image{}, fmt.Errorf("No such image: %s", fetchImageNames(since))
177+
return []images.Image{}, fmt.Errorf("no such image: %s", fetchImageNames(since))
180178
}
181179
minTime = sinceImages[0].CreatedAt
182180
for _, image := range sinceImages {

0 commit comments

Comments
 (0)