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

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
This commit is contained in:
Silvin Lubecki 2019-04-02 13:38:48 +02:00 committed by Sebastiaan van Stijn
parent a3c7cb4f12
commit 47741f81d1
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