Set Version info in rootcmd

This commit is contained in:
Samuel Lorch 2024-03-26 11:43:10 +01:00
parent 4975d53b4d
commit 4a870ea137
2 changed files with 11 additions and 1 deletions

View file

@ -120,3 +120,7 @@ func initConfig() {
fmt.Fprintln(os.Stderr, "Getting Private Key File Flag:", err)
}
}
func SetVersionInfo(version, commit, date string) {
rootCmd.Version = fmt.Sprintf("%s (Built on %s from Git SHA %s)", version, date, commit)
}