From 729fe364bcefeefff482ef8c9b784714960f1bc2 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Mon, 18 Nov 2024 13:14:50 +0200 Subject: [PATCH] use strings.TrimLeft --- cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/main.go b/cli/main.go index 651b1930d..c00f4b012 100644 --- a/cli/main.go +++ b/cli/main.go @@ -191,7 +191,7 @@ func getVersion(builtBy, date, commit, version string) string { if ok { version = bi.Main.Version if strings.HasPrefix(version, "v") { - version = bi.Main.Version[1:] + version = strings.TrimLeft(bi.Main.Version, "v") } if len(buildInfo) == 0 { return fmt.Sprintf("version %s\n", version)