From 3e5bad7ab816d10d2531422ce3507719e31a899d Mon Sep 17 00:00:00 2001 From: Christian Lohr Date: Sun, 30 Jul 2023 11:43:36 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=94=A7=20Ensure=20v-prefixed=20ver?= =?UTF-8?q?sion=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 3d2026fe..03df27ba 100644 --- a/app/app.go +++ b/app/app.go @@ -1,6 +1,7 @@ package app import ( + "fmt" "os" "strings" gotime "time" @@ -47,7 +48,13 @@ var ( commit = "" ) -func Version() string { return version } +func Version() string { + if !strings.HasPrefix(version, "v") { + version = fmt.Sprintf("v%s", version) + } + + return version +} func Commit() string { return commit }