summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorAnders F Björklund <anders.f.bjorklund@gmail.com>2018-10-30 23:55:48 +0100
committerAnders F Björklund <anders.f.bjorklund@gmail.com>2018-10-31 00:27:08 +0100
commitb2fef1a8badb875339d6329c095842baee4b3a17 (patch)
tree42e9c0a95a03d90b1aea21fa45bc6efc7be12e21 /libpod
parentaef9d56ae20e34447a69e19613629b8281a78502 (diff)
downloadpodman-b2fef1a8badb875339d6329c095842baee4b3a17.tar.gz
podman-b2fef1a8badb875339d6329c095842baee4b3a17.tar.bz2
podman-b2fef1a8badb875339d6329c095842baee4b3a17.zip
Fix setting of version information
It was setting the wrong variable (CamelCase) in the wrong module ("main", not "libpod")... Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/version.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/version.go b/libpod/version.go
index 5e7cd83c9..966588ae9 100644
--- a/libpod/version.go
+++ b/libpod/version.go
@@ -11,10 +11,10 @@ import (
var (
// GitCommit is the commit that the binary is being built from.
// It will be populated by the Makefile.
- GitCommit string
+ gitCommit string
// BuildInfo is the time at which the binary was built
// It will be populated by the Makefile.
- BuildInfo string
+ buildInfo string
)
//Version is an output struct for varlink
@@ -30,9 +30,9 @@ type Version struct {
func GetVersion() (Version, error) {
var err error
var buildTime int64
- if BuildInfo != "" {
+ if buildInfo != "" {
// Converts unix time from string to int64
- buildTime, err = strconv.ParseInt(BuildInfo, 10, 64)
+ buildTime, err = strconv.ParseInt(buildInfo, 10, 64)
if err != nil {
return Version{}, err
@@ -41,7 +41,7 @@ func GetVersion() (Version, error) {
return Version{
Version: podmanVersion.Version,
GoVersion: runtime.Version(),
- GitCommit: GitCommit,
+ GitCommit: gitCommit,
Built: buildTime,
OsArch: runtime.GOOS + "/" + runtime.GOARCH,
}, nil