feat: add GitCommit/GitBranch/BuildTime in version info

This commit is contained in:
lilong.129
2025-03-17 20:40:03 +08:00
parent fb3f8a6fca
commit d63e5e0c1a
6 changed files with 40 additions and 39 deletions

View File

@@ -51,7 +51,7 @@ Copyright © 2017-present debugtalk. Apache-2.0 License.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
hrp.InitLogger(logLevel, logJSON)
},
Version: version.VERSION,
Version: version.GetVersionInfo(),
TraverseChildren: true, // parses flags on all parents before executing child command
SilenceUsage: true, // silence usage when an error occurs
}