mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
Set correct versioning for CoreDNS (#225)
This needs a patch in caddy to work properly, but we want something like it anyway. See https://github.com/mholt/caddy/pull/1058
This commit is contained in:
21
coredns.go
21
coredns.go
@@ -10,15 +10,22 @@ import (
|
|||||||
//go:generate go run plugin_generate.go
|
//go:generate go run plugin_generate.go
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Default values for flags for CoreDNS.
|
setFlag()
|
||||||
flag.Set("type", "dns")
|
setName()
|
||||||
|
|
||||||
// Values specific for CoreDNS.
|
|
||||||
caddy.DefaultConfigFile = "Corefile"
|
|
||||||
caddy.AppName = "coredns"
|
|
||||||
caddy.AppVersion = version
|
|
||||||
|
|
||||||
caddymain.Run()
|
caddymain.Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setFlag sets flags to predefined values for CoreDNS.
|
||||||
|
func setFlag() {
|
||||||
|
flag.Set("type", "dns")
|
||||||
|
}
|
||||||
|
|
||||||
|
// setName sets application name and versioning information for CoreDNS.
|
||||||
|
func setName() {
|
||||||
|
caddy.DefaultConfigFile = "Corefile"
|
||||||
|
caddy.AppName = "CoreDNS"
|
||||||
|
caddy.AppVersion = version
|
||||||
|
}
|
||||||
|
|
||||||
const version = "001"
|
const version = "001"
|
||||||
|
|||||||
Reference in New Issue
Block a user