mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-04 02:45:35 +08:00
17 lines
233 B
Go
17 lines
233 B
Go
package version
|
|
|
|
import "runtime/debug"
|
|
|
|
// Set by GoReleaser
|
|
var version string
|
|
|
|
func Version() string {
|
|
if version != "" {
|
|
return version
|
|
}
|
|
bi, ok := debug.ReadBuildInfo()
|
|
if !ok {
|
|
return "dev"
|
|
}
|
|
return bi.Main.Version
|
|
}
|