mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-07-05 03:27:13 +00:00
20 lines
395 B
Go
20 lines
395 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// versionCmd represents the version command
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the version number of k8sgpt",
|
|
Long: `All software has versions. This is k8sgpt's`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
cmd.Printf("k8sgpt version %s", version)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|