cli/command/system: clientVersion: make all fields "omitempty"

This allows the type to be used for situations where this information is
not present, or not to be printed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-04-10 02:41:50 +02:00
parent 9202bef4a7
commit 3124e779c9
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 9 additions and 9 deletions

View File

@ -72,15 +72,15 @@ type platformInfo struct {
type clientVersion struct { type clientVersion struct {
Platform *platformInfo `json:"Platform,omitempty"` Platform *platformInfo `json:"Platform,omitempty"`
Version string Version string `json:"Version,omitempty"`
APIVersion string `json:"ApiVersion"` APIVersion string `json:"ApiVersion,omitempty"`
DefaultAPIVersion string `json:"DefaultAPIVersion,omitempty"` DefaultAPIVersion string `json:"DefaultAPIVersion,omitempty"`
GitCommit string GitCommit string `json:"GitCommit,omitempty"`
GoVersion string GoVersion string `json:"GoVersion,omitempty"`
Os string Os string `json:"Os,omitempty"`
Arch string Arch string `json:"Arch,omitempty"`
BuildTime string `json:",omitempty"` BuildTime string `json:"BuildTime,omitempty"`
Context string Context string `json:"Context"`
} }
// NewVersionCommand creates a new cobra.Command for `docker version` // NewVersionCommand creates a new cobra.Command for `docker version`