1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/cmd/cli/kubectl-kyverno/version/command.go

23 lines
497 B
Go
Raw Normal View History

2020-03-06 03:00:18 +05:30
package version
import (
"fmt"
"github.com/kyverno/kyverno/pkg/version"
2020-03-06 03:00:18 +05:30
"github.com/spf13/cobra"
)
2020-11-17 13:07:30 -08:00
// Command returns version command
2020-03-06 03:00:18 +05:30
func Command() *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "Shows current version of kyverno",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Printf("Version: %s\n", version.BuildVersion)
fmt.Printf("Time: %s\n", version.BuildTime)
fmt.Printf("Git commit ID: %s\n", version.BuildHash)
return nil
},
}
}