Skip to content

Commit d634399

Browse files
committed
Remove unneeded nil checks
Both fields can be nil and there is no need to pre-check them. Signed-off-by: Sascha Grunert <[email protected]>
1 parent 8aed864 commit d634399

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: cmd/crictl/image.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -657,12 +657,8 @@ func PullImageWithSandbox(client internalapi.ImageManagerService, image string,
657657
Image: image,
658658
Annotations: ann,
659659
},
660-
}
661-
if auth != nil {
662-
request.Auth = auth
663-
}
664-
if sandbox != nil {
665-
request.SandboxConfig = sandbox
660+
Auth: auth,
661+
SandboxConfig: sandbox,
666662
}
667663
logrus.Debugf("PullImageRequest: %v", request)
668664

0 commit comments

Comments
 (0)