print version (#13)

Reviewed-on: #13
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-10-27 23:55:39 +00:00
committed by phoenix
parent 7e3fff50c1
commit 154c9f493e
4 changed files with 47 additions and 10 deletions
+13 -3
View File
@@ -1,7 +1,17 @@
package version
import "fmt"
var (
Version = "dev"
Commit = "none"
Date = "unknown"
Version = "dev"
BuildTime = "unknown"
Commit = "unknown"
GoVersion = "unknown"
)
func String() string {
return fmt.Sprintf(
"Version: %s\nBuild Date: %s\nCommit: %s\nGo Version: %s",
Version, BuildTime, Commit, GoVersion,
)
}