Skip to content

Commit 5d37acd

Browse files
committed
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 <github@gone.nl>
1 parent 6233560 commit 5d37acd

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

cli/command/system/version.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Client:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}}
3333
Context: {{.Context}}
3434
{{- end}}
3535
36-
{{- if .ServerOK}}{{with .Server}}
36+
{{- if ne .Server nil}}{{with .Server}}
3737
3838
Server:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}}
3939
{{- range $component := .Components}}
@@ -80,12 +80,6 @@ type clientVersion struct {
8080
Context string
8181
}
8282

83-
// ServerOK returns true when the client could connect to the docker server
84-
// and parse the information received. It returns false otherwise.
85-
func (v versionInfo) ServerOK() bool {
86-
return v.Server != nil
87-
}
88-
8983
// NewVersionCommand creates a new cobra.Command for `docker version`
9084
func NewVersionCommand(dockerCli command.Cli) *cobra.Command {
9185
var opts versionOptions

0 commit comments

Comments
 (0)