diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-09-18 14:10:14 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-09-18 15:13:58 -0700 |
commit | c4b49afad37b4e64a1aa2b90f4d3b04626fabd44 (patch) | |
tree | 12ea0c158c3d51c3ed571706f22668ba48474d1d /libpod/define/version.go | |
parent | 5b7509c562e040ab8ed17990299c0b6eb52cecee (diff) | |
download | podman-c4b49afad37b4e64a1aa2b90f4d3b04626fabd44.tar.gz podman-c4b49afad37b4e64a1aa2b90f4d3b04626fabd44.tar.bz2 podman-c4b49afad37b4e64a1aa2b90f4d3b04626fabd44.zip |
Refactor version handling in cmd tree
* Move from simple string to semver objects
* Change client API Version from '1' to 2.0.0
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'libpod/define/version.go')
-rw-r--r-- | libpod/define/version.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/define/version.go b/libpod/define/version.go index daa5cf7b2..d4cdd539d 100644 --- a/libpod/define/version.go +++ b/libpod/define/version.go @@ -18,9 +18,9 @@ var ( buildInfo string ) -// Version is an output struct for varlink +// Version is an output struct for API type Version struct { - APIVersion int64 + APIVersion string Version string GoVersion string GitCommit string @@ -29,7 +29,7 @@ type Version struct { OsArch string } -// GetVersion returns a VersionOutput struct for varlink and podman +// GetVersion returns a VersionOutput struct for API and podman func GetVersion() (Version, error) { var err error var buildTime int64 @@ -42,8 +42,8 @@ func GetVersion() (Version, error) { } } return Version{ - APIVersion: podmanVersion.APIVersion, - Version: podmanVersion.Version, + APIVersion: podmanVersion.APIVersion.String(), + Version: podmanVersion.Version.String(), GoVersion: runtime.Version(), GitCommit: gitCommit, BuiltTime: time.Unix(buildTime, 0).Format(time.ANSIC), |