dnscontrol/pkg/version/version.go
James O'Gorman cd8892f9bb
BUG: User-Agent should include DNSControl version (#3653)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2025-07-09 10:56:38 -04:00

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
}