1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/version/version.go
Charles-Edouard Brétéché 144afb6f0f
refactor: split main into sub func (#4810)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-10-05 10:58:35 +00:00

18 lines
414 B
Go

package version
import (
"github.com/go-logr/logr"
)
// These fields are set during an official build
// Global vars set from command-line arguments
var (
BuildVersion = "--"
BuildHash = "--"
BuildTime = "--"
)
// PrintVersionInfo displays the kyverno version - git version
func PrintVersionInfo(log logr.Logger) {
log.Info("version", "version", BuildVersion, "hash", BuildHash, "time", BuildTime)
}