From 3124e779c986754bd4adc7b4581d48fc1c74c6aa Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 10 Apr 2023 02:41:50 +0200 Subject: [PATCH] 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 --- cli/command/system/version.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/command/system/version.go b/cli/command/system/version.go index 365012dce2..a46101ffb1 100644 --- a/cli/command/system/version.go +++ b/cli/command/system/version.go @@ -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`