Files
draft/cmd/version.go
T

23 lines
395 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var version = "dev"
func init() {
rootCmd.AddCommand(versionCmd)
}
var versionCmd = &cobra.Command{
Use: "version",
Short: "Display the version of Keystone",
Long: `Display the current version of the Keystone CLI tool.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Keystone CLI version: %s\n", version)
},
}