Skip to content

Commit ab817b2

Browse files
authored
Fix version pkg/ when installing with go install (#4)
1 parent d782b1d commit ab817b2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkg/version/version.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import (
44
"fmt"
55
)
66

7+
const (
8+
LatestVersion = "v0.0.5"
9+
)
10+
711
var (
812
Version string // = "v0.0.0"
913
BuildDate string // = "2023-03-06_09:55:34"
@@ -16,5 +20,8 @@ func FullString() string {
1620
}
1721

1822
func String() string {
23+
if Version == "" {
24+
Version = LatestVersion
25+
}
1926
return Version
2027
}

0 commit comments

Comments
 (0)