Skip to content

Commit

Permalink
use strings.TrimLeft
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Nov 18, 2024
1 parent 0b8a2de commit 729fe36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 729fe36

Please sign in to comment.