mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 10:40:27 +00:00
23 lines
501 B
Go
23 lines
501 B
Go
package version
|
|
|
|
var buildName string
|
|
var buildVersion string
|
|
|
|
// BuildName gets the current build name. This is usually injected if built
|
|
// from git, or returns "unknown" otherwise.
|
|
func BuildName() string {
|
|
if buildName == "" {
|
|
return "unknown"
|
|
}
|
|
return buildName
|
|
}
|
|
|
|
// BuildVersion gets the current build version. This is usually injected if
|
|
// built from git, or returns "unknown" otherwise.
|
|
func BuildVersion() string {
|
|
if buildVersion == "" {
|
|
return "unknown"
|
|
}
|
|
return buildVersion
|
|
}
|