summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-21 13:23:20 +0000
committerGitHub <noreply@github.com>2020-09-21 13:23:20 +0000
commit0a46b9c9e6aab2a5255914b285ae5b3cddb2aa5b (patch)
tree41f8c9bb5802aff0b6482f67477a255308e7bc8b /libpod
parent84c87fc7d3315ffcc44dde2469a613cb9b5c4190 (diff)
parentc4b49afad37b4e64a1aa2b90f4d3b04626fabd44 (diff)
downloadpodman-0a46b9c9e6aab2a5255914b285ae5b3cddb2aa5b.tar.gz
podman-0a46b9c9e6aab2a5255914b285ae5b3cddb2aa5b.tar.bz2
podman-0a46b9c9e6aab2a5255914b285ae5b3cddb2aa5b.zip
Merge pull request #7696 from jwhonce/wip/version
Refactor version handling in cmd tree
Diffstat (limited to 'libpod')
-rw-r--r--libpod/define/version.go10
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),