mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-12-12 01:38:14 +00:00
23 lines
407 B
Go
23 lines
407 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
var KubeBenchVersion string
|
||
|
|
||
|
// versionCmd represents the version command
|
||
|
var versionCmd = &cobra.Command{
|
||
|
Use: "version",
|
||
|
Short: "Shows the version of kube-bench.",
|
||
|
Long: `Shows the version of kube-bench.`,
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
fmt.Println(KubeBenchVersion)
|
||
|
},
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
RootCmd.AddCommand(versionCmd)
|
||
|
}
|