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 {
Platform *platformInfo `json:"Platform,omitempty"`
Version string
APIVersion string `json:"ApiVersion"`
DefaultAPIVersion string `json:"DefaultAPIVersion,omitempty"`
GitCommit string
GoVersion string
Os string
Arch string
BuildTime string `json:",omitempty"`
Context string
Version string `json:"Version,omitempty"`
APIVersion string `json:"ApiVersion,omitempty"`
DefaultAPIVersion string `json:"DefaultAPIVersion,omitempty"`
GitCommit string `json:"GitCommit,omitempty"`
GoVersion string `json:"GoVersion,omitempty"`
Os string `json:"Os,omitempty"`
Arch string `json:"Arch,omitempty"`
BuildTime string `json:"BuildTime,omitempty"`
Context string `json:"Context"`
}
// NewVersionCommand creates a new cobra.Command for `docker version`