add version command

This commit is contained in:
2025-12-03 10:23:39 +00:00
parent 69e2c873d8
commit 58d75bfc5a
2 changed files with 24 additions and 1 deletions

View File

@@ -31,6 +31,13 @@ import (
func main() {
runtime.GOMAXPROCS(128)
debug.SetGCPercent(10)
// Handle 'version' subcommand early, before any other initialization
if config.VersionRequested() {
fmt.Println(version.V)
os.Exit(0)
}
var err error
var cfg *config.C
if cfg, err = config.New(); chk.T(err) {