Rename port to dns.port (#300)

Avoid clashing with other server types.
This commit is contained in:
Miek Gieben
2016-09-25 19:19:15 +01:00
committed by GitHub
parent 9b5c9df321
commit 440e92465d

View File

@@ -14,8 +14,10 @@ import (
const serverType = "dns"
// Any flags defined here, need to be namespaced to the serverType other
// wise they potentially clash with other server types.
func init() {
flag.StringVar(&Port, "port", DefaultPort, "Default port")
flag.StringVar(&Port, serverType+".port", DefaultPort, "Default port")
caddy.RegisterServerType(serverType, caddy.ServerType{
Directives: func() []string { return directives },