From 9ac043bc9d83b9d1a78dc17e0fcfa8d1b3b75165 Mon Sep 17 00:00:00 2001 From: Silvin Lubecki Date: Tue, 2 Apr 2019 13:38:48 +0200 Subject: [PATCH] cli/command/system/info.go:116:68: prettyPrintClientInfo - result 0 (error) is always nil (unparam) Signed-off-by: Silvin Lubecki (cherry picked from commit 47741f81d15df9e347deb472bed9c8ecb13d3470) Signed-off-by: Sebastiaan van Stijn --- cli/command/system/info.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cli/command/system/info.go b/cli/command/system/info.go index 7adf92bd50..d837ca5231 100644 --- a/cli/command/system/info.go +++ b/cli/command/system/info.go @@ -88,9 +88,7 @@ func runInfo(cmd *cobra.Command, dockerCli command.Cli, opts *infoOptions) error func prettyPrintInfo(dockerCli command.Cli, info info) error { fmt.Fprintln(dockerCli.Out(), "Client:") if info.ClientInfo != nil { - if err := prettyPrintClientInfo(dockerCli, *info.ClientInfo); err != nil { - info.ClientErrors = append(info.ClientErrors, err.Error()) - } + prettyPrintClientInfo(dockerCli, *info.ClientInfo) } for _, err := range info.ClientErrors { fmt.Fprintln(dockerCli.Out(), "ERROR:", err) @@ -113,7 +111,7 @@ func prettyPrintInfo(dockerCli command.Cli, info info) error { return nil } -func prettyPrintClientInfo(dockerCli command.Cli, info clientInfo) error { +func prettyPrintClientInfo(dockerCli command.Cli, info clientInfo) { fmt.Fprintln(dockerCli.Out(), " Debug Mode:", info.Debug) if len(info.Plugins) > 0 { @@ -134,8 +132,6 @@ func prettyPrintClientInfo(dockerCli command.Cli, info clientInfo) error { if len(info.Warnings) > 0 { fmt.Fprintln(dockerCli.Err(), strings.Join(info.Warnings, "\n")) } - - return nil } // nolint: gocyclo