Skip to content

Commit d8af781

Browse files
committed
cli/command/system: remove redundant nil-check (gosimple)
cli/command/system/info.go:375:5: S1009: should omit nil check; len() for []github.com/docker/docker/api/types/system.NetworkAddressPool is defined as zero (gosimple) if info.DefaultAddressPools != nil && len(info.DefaultAddressPools) > 0 { ^ Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit cc1d7b7) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent f042ddb commit d8af781

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/command/system/info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func prettyPrintServerInfo(streams command.Streams, info *dockerInfo) []error {
372372
fprintln(output, " Product License:", info.ProductLicense)
373373
}
374374

375-
if info.DefaultAddressPools != nil && len(info.DefaultAddressPools) > 0 {
375+
if len(info.DefaultAddressPools) > 0 {
376376
fprintln(output, " Default Address Pools:")
377377
for _, pool := range info.DefaultAddressPools {
378378
fprintf(output, " Base: %s, Size: %d\n", pool.Base, pool.Size)

0 commit comments

Comments
 (0)