mirror of
https://github.com/kubescape/kubescape.git
synced 2026-09-05 11:37:20 +00:00
30 lines
421 B
Go
30 lines
421 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
sha1ver string
|
|
buildTime string
|
|
)
|
|
|
|
// versionCmd represents the version command
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Get current version",
|
|
Long: ``,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println("version")
|
|
fmt.Println(sha1ver)
|
|
fmt.Println(buildTime)
|
|
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|