This commit is contained in:
zyj
2026-03-03 18:20:18 +08:00
commit a9f9330744
25 changed files with 5004 additions and 0 deletions

28
pkg/version/version.go Normal file
View File

@@ -0,0 +1,28 @@
package version
import (
"fmt"
"runtime"
)
// These variables are set at build time via ldflags.
var (
Version = "dev"
Commit = "unknown"
Date = "unknown"
)
// GetVersionString returns a short version string.
func GetVersionString() string {
return Version
}
// GetFullVersionInfo returns complete version information.
func GetFullVersionInfo() string {
return fmt.Sprintf(
"DevPack %s\n Commit: %s\n Built: %s\n Go: %s\n OS/Arch: %s/%s",
Version, Commit, Date,
runtime.Version(),
runtime.GOOS, runtime.GOARCH,
)
}