basic idea...

This commit is contained in:
eyedeekay
2025-05-05 17:05:43 -04:00
parent 13800ab183
commit c25e3688f3
12 changed files with 1924 additions and 0 deletions

30
pkg/cmd/version.go Normal file
View File

@ -0,0 +1,30 @@
// pkg/cmd/version.go
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// Version information
var (
Version = "0.1.0"
BuildDate = "unknown"
Commit = "unknown"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number",
Long: `Print the version, build date, and commit hash.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("go-github-dashboard version %s\n", Version)
fmt.Printf("Build date: %s\n", BuildDate)
fmt.Printf("Commit: %s\n", Commit)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}