From 794e5a22c1d163158987f1761db001fb5f77730d Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Thu, 13 Dec 2018 22:35:43 -0600 Subject: [PATCH] Rename command.VERSION to command.Version --- pkg/api/api.go | 2 +- pkg/cli/cli.go | 2 +- pkg/command/version.go | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/api/api.go b/pkg/api/api.go index a6b30c4..4f27f8c 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -449,7 +449,7 @@ func GetBookmarks(c *gin.Context) { func GetInfo(c *gin.Context) { successResponse(c, gin.H{ - "version": command.VERSION, + "version": command.Version, "git_sha": command.GitCommit, "build_time": command.BuildTime, }) diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 5c58a74..8785154 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -136,7 +136,7 @@ For proper read-only access please follow postgresql role management documentati } func printVersion() { - str := fmt.Sprintf("Pgweb v%s", command.VERSION) + str := fmt.Sprintf("Pgweb v%s", command.Version) if command.GitCommit != "" { str += fmt.Sprintf(" (git: %s)", command.GitCommit) } diff --git a/pkg/command/version.go b/pkg/command/version.go index 675955f..803a419 100644 --- a/pkg/command/version.go +++ b/pkg/command/version.go @@ -1,6 +1,8 @@ package command -const VERSION = "0.10.0" +const ( + Version = "0.10.0" +) var ( GitCommit string