Skip to content

Commit

Permalink
Fix version info
Browse files Browse the repository at this point in the history
  • Loading branch information
knightpp committed May 21, 2023
1 parent 0860fa7 commit 31f7df5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ func main() {
flag.Parse()

if flagVersion {
fmt.Printf("version:\t%srevision:\t%s\ndate:\t\t%s\ndirty:\t\t%v\ncompiler:\t%s\n", version, vcsCommit, vcsTime, vcsModified, compiler)
if version != "" {
fmt.Println("version:\t", version)
}
fmt.Printf("revision:\t%s\ndate:\t\t%s\ndirty:\t\t%v\ncompiler:\t%s\n", vcsCommit, vcsTime, vcsModified, compiler)
return
}

Expand Down

0 comments on commit 31f7df5

Please sign in to comment.