Skip to content

Commit 04de44f

Browse files
committed
Shut up staticcheck SA5011
The "o == nil" check was confusing staticcheck into thinking it might be nil even _after_ the Fatalf (apparently it doesn't recognize that that terminates). Instead, simplify, drop that extra condition, and if we ever got a nil, we are going to crash. *shrug*, less test code to maintain in the future. Signed-off-by: Miloslav Trmač <[email protected]>
1 parent 27a3c17 commit 04de44f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/pkg/manifests/manifests_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func TestAddInstance(t *testing.T) {
105105
t.Fatalf("adding an instance without platform info failed in %s: %v", version, err)
106106
}
107107
o, err := list.findOCIv1(manifestDigest)
108-
if o == nil || err != nil {
108+
if err != nil {
109109
t.Fatalf("adding an instance failed in %s: %v", version, err)
110110
}
111111
if o.Platform != nil {

0 commit comments

Comments
 (0)