Skip to content

Commit 40f052c

Browse files
committed
cli/command/container: use reflect IsZero
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent f28565d commit 40f052c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/command/container/opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ func parseNetworkOpts(copts *containerOptions) (map[string]*network.EndpointSett
795795
// and only a single network is specified, omit the endpoint-configuration
796796
// on the client (the daemon will still create it when creating the container)
797797
if i == 0 && len(copts.netMode.Value()) == 1 {
798-
if ep == nil || reflect.DeepEqual(*ep, network.EndpointSettings{}) {
798+
if ep == nil || reflect.ValueOf(*ep).IsZero() {
799799
continue
800800
}
801801
}

0 commit comments

Comments
 (0)