initial rebuild

This commit is contained in:
allanice001
2025-09-01 13:34:13 +01:00
commit 95bd9615d1
100 changed files with 12440 additions and 0 deletions

24
cmd/cli/version.go Normal file
View File

@@ -0,0 +1,24 @@
package cli
import (
"fmt"
"github.com/earthboundkid/versioninfo/v2"
"github.com/spf13/cobra"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of the application",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Version:", versioninfo.Version)
fmt.Println("Revision:", versioninfo.Revision)
fmt.Println("DirtyBuild:", versioninfo.DirtyBuild)
fmt.Println("LastCommit:", versioninfo.LastCommit)
fmt.Printf("Version: %s\n", versioninfo.Short())
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}