Skip to content

Commit b0201c8

Browse files
committed
cmd/docker: hideUnsupportedFeatures: remove unused error return
``` 70.72 cmd/docker/docker.go:560:74: hideUnsupportedFeatures - result 0 (error) is always nil (unparam) 70.72 func hideUnsupportedFeatures(cmd *cobra.Command, details versionDetails) error { 70.72 ^ 70.72 1 issues: ``` Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 2b4fd0d commit b0201c8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cmd/docker/docker.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,7 @@ func setHelpFunc(dockerCli command.Cli, cmd *cobra.Command) {
254254
ccmd.Println(err)
255255
return
256256
}
257-
if err := hideUnsupportedFeatures(ccmd, dockerCli); err != nil {
258-
ccmd.Println(err)
259-
return
260-
}
257+
hideUnsupportedFeatures(ccmd, dockerCli)
261258

262259
defaultHelpFunc(ccmd, args)
263260
})
@@ -557,7 +554,7 @@ func hideSubcommandIf(subcmd *cobra.Command, condition func(string) bool, annota
557554
}
558555
}
559556

560-
func hideUnsupportedFeatures(cmd *cobra.Command, details versionDetails) error {
557+
func hideUnsupportedFeatures(cmd *cobra.Command, details versionDetails) {
561558
var (
562559
notExperimental = func(_ string) bool { return !details.ServerInfo().HasExperimental }
563560
notOSType = func(v string) bool { return details.ServerInfo().OSType != "" && v != details.ServerInfo().OSType }
@@ -613,7 +610,6 @@ func hideUnsupportedFeatures(cmd *cobra.Command, details versionDetails) error {
613610
hideSubcommandIf(subcmd, notSwarmStatus, "swarm")
614611
hideSubcommandIf(subcmd, versionOlderThan, "version")
615612
}
616-
return nil
617613
}
618614

619615
// Checks if a command or one of its ancestors is in the list

0 commit comments

Comments
 (0)