From 56d6e1102df84bc76ea017f280c850ef285acc1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Mej=C3=ADas=20Rodr=C3=ADguez?= Date: Tue, 23 Jul 2019 07:10:34 -0400 Subject: [PATCH] Move variable with program name to the top in version.go --- common/version.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/version.go b/common/version.go index 1502983..938aa0f 100644 --- a/common/version.go +++ b/common/version.go @@ -15,6 +15,9 @@ var ( Suffix: "", } + // The program name + programName = "Portainer Stack Utils" + // commitHash contains the current Git revision. Use Go Releaser to make sure this gets set. commitHash string @@ -46,8 +49,6 @@ func (v Version) String() string { } func BuildVersionString() string { - program := "Portainer Stack Utils" - version := "v" + CurrentVersion.String() if commitHash != "" { @@ -61,5 +62,5 @@ func BuildVersionString() string { date = "unknown" } - return fmt.Sprintf("%s %s %s BuildDate: %s", program, version, osArch, date) + return fmt.Sprintf("%s %s %s BuildDate: %s", programName, version, osArch, date) }