Move version to main package

This commit is contained in:
z0mbix 2021-11-16 17:19:54 +00:00
parent 9410471142
commit c3e6205f15
No known key found for this signature in database
GPG key ID: FFCE5C105D81AB88
3 changed files with 4 additions and 7 deletions

View file

@ -15,6 +15,8 @@ import (
"github.com/yannh/kubeconform/pkg/validator"
)
var version = "development"
func processResults(cancel context.CancelFunc, o output.Output, validationResults <-chan validator.Result, exitOnError bool) <-chan bool {
success := true
result := make(chan bool)
@ -49,6 +51,7 @@ func realMain() int {
if cfg.Help {
return 0
} else if cfg.Version {
fmt.Println(version)
return 0
} else if out != "" {
fmt.Println(out)