mirror of https://github.com/docker/cli.git
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:
parent
7db8c83e3a
commit
9ac043bc9d
|
@ -88,9 +88,7 @@ func runInfo(cmd *cobra.Command, dockerCli command.Cli, opts *infoOptions) error
|
||||||
func prettyPrintInfo(dockerCli command.Cli, info info) error {
|
func prettyPrintInfo(dockerCli command.Cli, info info) error {
|
||||||
fmt.Fprintln(dockerCli.Out(), "Client:")
|
fmt.Fprintln(dockerCli.Out(), "Client:")
|
||||||
if info.ClientInfo != nil {
|
if info.ClientInfo != nil {
|
||||||
if err := prettyPrintClientInfo(dockerCli, *info.ClientInfo); err != nil {
|
prettyPrintClientInfo(dockerCli, *info.ClientInfo)
|
||||||
info.ClientErrors = append(info.ClientErrors, err.Error())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for _, err := range info.ClientErrors {
|
for _, err := range info.ClientErrors {
|
||||||
fmt.Fprintln(dockerCli.Out(), "ERROR:", err)
|
fmt.Fprintln(dockerCli.Out(), "ERROR:", err)
|
||||||
|
@ -113,7 +111,7 @@ func prettyPrintInfo(dockerCli command.Cli, info info) error {
|
||||||
return nil
|
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)
|
fmt.Fprintln(dockerCli.Out(), " Debug Mode:", info.Debug)
|
||||||
|
|
||||||
if len(info.Plugins) > 0 {
|
if len(info.Plugins) > 0 {
|
||||||
|
@ -134,8 +132,6 @@ func prettyPrintClientInfo(dockerCli command.Cli, info clientInfo) error {
|
||||||
if len(info.Warnings) > 0 {
|
if len(info.Warnings) > 0 {
|
||||||
fmt.Fprintln(dockerCli.Err(), strings.Join(info.Warnings, "\n"))
|
fmt.Fprintln(dockerCli.Err(), strings.Join(info.Warnings, "\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint: gocyclo
|
// nolint: gocyclo
|
||||||
|
|
Loading…
Reference in New Issue