mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-18 07:56:56 +00:00
25 lines
459 B
Go
25 lines
459 B
Go
|
|
package version
|
||
|
|
|
||
|
|
import (
|
||
|
|
"go.uber.org/zap"
|
||
|
|
)
|
||
|
|
|
||
|
|
// These fields are set during an official build
|
||
|
|
// Global vars set from command-line arguments
|
||
|
|
var (
|
||
|
|
version = "--"
|
||
|
|
buildhash = "--"
|
||
|
|
buildtime = "--"
|
||
|
|
)
|
||
|
|
|
||
|
|
//PrintVersionInfo displays the kyverno version - git version
|
||
|
|
func PrintVersionInfo() {
|
||
|
|
zap.S().Info("Version: ", version)
|
||
|
|
zap.S().Info("BuildHash: ", buildhash)
|
||
|
|
zap.S().Info("BuildTime: ", buildtime)
|
||
|
|
}
|
||
|
|
|
||
|
|
func GetVersion() string {
|
||
|
|
return version
|
||
|
|
}
|