From 5d37acddebc3a31e5e6c2491a17608a07f933683 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 9 Apr 2023 15:36:12 +0200 Subject: [PATCH] cli/command/system:remove versionInfo.ServerOK() utility It's defined on a non-exported type, and was only used in a template. Replacing for a basic "nil" check, which should do the same. Signed-off-by: Sebastiaan van Stijn --- cli/command/system/version.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cli/command/system/version.go b/cli/command/system/version.go index 712f0a934c..952c4d72ab 100644 --- a/cli/command/system/version.go +++ b/cli/command/system/version.go @@ -33,7 +33,7 @@ Client:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}} Context: {{.Context}} {{- end}} -{{- if .ServerOK}}{{with .Server}} +{{- if ne .Server nil}}{{with .Server}} Server:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}} {{- range $component := .Components}} @@ -80,12 +80,6 @@ type clientVersion struct { Context string } -// ServerOK returns true when the client could connect to the docker server -// and parse the information received. It returns false otherwise. -func (v versionInfo) ServerOK() bool { - return v.Server != nil -} - // NewVersionCommand creates a new cobra.Command for `docker version` func NewVersionCommand(dockerCli command.Cli) *cobra.Command { var opts versionOptions