k8sgpt/cmd/version.go
AlexsJones 1c0c7bac73 feat: http server
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-04-06 21:35:47 +01:00

22 lines
403 B
Go

package cmd
import (
"fmt"
"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) {
fmt.Printf("k8sgpt version %s", version)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}