From def54fb1e6b3ae84292c4ea73d8d32ea00d336f4 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Tue, 20 Jul 2021 23:26:22 -0500 Subject: [PATCH] fix version command --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 344f927..5d6ec40 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,7 @@ import ( ) // version is a linker flag set by goreleaser -var version = "v0.0.0" +var version = "0.0.0" func main() { // TODO: https://github.com/spf13/viper/pull/1064 @@ -58,7 +58,7 @@ func main() { root.AddCommand(update.NewCommand()) root.SetHelpCommand(&cobra.Command{Hidden: true}) - root.SetVersionTemplate("{{.Version}}\n") + root.SetVersionTemplate("v{{.Version}}\n") _ = root.Execute() }