k8sgpt/cmd/version.go
AlexsJones 0c231d635e feat: version
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 20:49:40 +01:00

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)
}