1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-11-23 08:38:06 +00:00
kube-bench/cmd/version.go
Huang Huang e0fe5698a0
chore(lint): setup golangci-lint (#1144)
* chore(lint): setup golangci-lint

* linters: gofmt, goimports and misspell

* Update build.yml

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
Co-authored-by: Yoav Rotem <yoavrotems97@gmail.com>
2022-04-05 16:25:45 +03:00

24 lines
408 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)
}