cli/command/system/info.go:116:68: prettyPrintClientInfo - result 0 (error) is always nil (unparam)

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 47741f81d1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Silvin Lubecki 2019-04-02 13:38:48 +02:00 committed by Sebastiaan van Stijn
parent 7db8c83e3a
commit 9ac043bc9d
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 6 deletions

View File

@ -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