summaryrefslogtreecommitdiff
path: root/libpod/version.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-06-25 08:40:19 -0500
committerbaude <bbaude@redhat.com>2019-06-27 07:56:24 -0500
commit8561b996447793999a6465f9b9e3f0f7bbea2c6a (patch)
tree133cf8d959934eac882535e6b572aee5d0acf3c5 /libpod/version.go
parent58a1777f518657ff12744bb69ccf2dab3d429625 (diff)
downloadpodman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.tar.gz
podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.tar.bz2
podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.zip
libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/version.go')
-rw-r--r--libpod/version.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/libpod/version.go b/libpod/version.go
deleted file mode 100644
index d2b99a275..000000000
--- a/libpod/version.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package libpod
-
-import (
- "runtime"
- "strconv"
-
- podmanVersion "github.com/containers/libpod/version"
-)
-
-// Overwritten at build time
-var (
- // GitCommit is the commit that the binary is being built from.
- // It will be populated by the Makefile.
- gitCommit string
- // BuildInfo is the time at which the binary was built
- // It will be populated by the Makefile.
- buildInfo string
-)
-
-//Version is an output struct for varlink
-type Version struct {
- RemoteAPIVersion int64
- Version string
- GoVersion string
- GitCommit string
- Built int64
- OsArch string
-}
-
-// GetVersion returns a VersionOutput struct for varlink and podman
-func GetVersion() (Version, error) {
- var err error
- var buildTime int64
- if buildInfo != "" {
- // Converts unix time from string to int64
- buildTime, err = strconv.ParseInt(buildInfo, 10, 64)
-
- if err != nil {
- return Version{}, err
- }
- }
- return Version{
- RemoteAPIVersion: podmanVersion.RemoteAPIVersion,
- Version: podmanVersion.Version,
- GoVersion: runtime.Version(),
- GitCommit: gitCommit,
- Built: buildTime,
- OsArch: runtime.GOOS + "/" + runtime.GOARCH,
- }, nil
-}