mirror of https://github.com/docker/cli.git
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>
This commit is contained in:
parent
623356001f
commit
5d37acddeb
|
@ -33,7 +33,7 @@ Client:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}}
|
||||||
Context: {{.Context}}
|
Context: {{.Context}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
|
||||||
{{- if .ServerOK}}{{with .Server}}
|
{{- if ne .Server nil}}{{with .Server}}
|
||||||
|
|
||||||
Server:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}}
|
Server:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}}
|
||||||
{{- range $component := .Components}}
|
{{- range $component := .Components}}
|
||||||
|
@ -80,12 +80,6 @@ type clientVersion struct {
|
||||||
Context string
|
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`
|
// NewVersionCommand creates a new cobra.Command for `docker version`
|
||||||
func NewVersionCommand(dockerCli command.Cli) *cobra.Command {
|
func NewVersionCommand(dockerCli command.Cli) *cobra.Command {
|
||||||
var opts versionOptions
|
var opts versionOptions
|
||||||
|
|
Loading…
Reference in New Issue