mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
22 lines
506 B
Go
22 lines
506 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 "yggdrasilctl"
|
|
}
|
|
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
|
|
}
|