package cmd import ( "fmt" "log/slog" "github.com/spf13/cobra" ) var ( version = "unset" commit = "unset" date = "unset" ) var versionCmd = &cobra.Command{ Use: "version", Short: "Show Kontor Version", Long: "Show Kontor Version", Run: func(cmd *cobra.Command, args []string) { slog.Info("version kontor") fmt.Println("Version: ", version) fmt.Println("Version: ", commit) fmt.Println("Version: ", date) }, } func init() { rootCmd.AddCommand(versionCmd) }