diff --git a/plugin/bind/bind.go b/plugin/bind/bind.go index 749561a36..cfbd36597 100644 --- a/plugin/bind/bind.go +++ b/plugin/bind/bind.go @@ -1,11 +1,6 @@ // Package bind allows binding to a specific interface instead of bind to all of them. package bind -import "github.com/caddyserver/caddy" +import "github.com/coredns/coredns/plugin" -func init() { - caddy.RegisterPlugin("bind", caddy.Plugin{ - ServerType: "dns", - Action: setup, - }) -} +func init() { plugin.Register("bind", setup) } diff --git a/plugin/cancel/cancel.go b/plugin/cancel/cancel.go index 10efabfea..98f4f2367 100644 --- a/plugin/cancel/cancel.go +++ b/plugin/cancel/cancel.go @@ -13,12 +13,7 @@ import ( "github.com/miekg/dns" ) -func init() { - caddy.RegisterPlugin("cancel", caddy.Plugin{ - ServerType: "dns", - Action: setup, - }) -} +func init() { plugin.Register("cancel", setup) } func setup(c *caddy.Controller) error { ca := Cancel{timeout: 5001 * time.Millisecond} diff --git a/plugin/debug/debug.go b/plugin/debug/debug.go index 225e5f422..91cc6fcf0 100644 --- a/plugin/debug/debug.go +++ b/plugin/debug/debug.go @@ -7,12 +7,7 @@ import ( "github.com/caddyserver/caddy" ) -func init() { - caddy.RegisterPlugin("debug", caddy.Plugin{ - ServerType: "dns", - Action: setup, - }) -} +func init() { plugin.Register("debug", setup) } func setup(c *caddy.Controller) error { config := dnsserver.GetConfig(c) diff --git a/plugin/root/root.go b/plugin/root/root.go index 15cc45626..66177a6bd 100644 --- a/plugin/root/root.go +++ b/plugin/root/root.go @@ -12,12 +12,7 @@ import ( var log = clog.NewWithPlugin("root") -func init() { - caddy.RegisterPlugin("root", caddy.Plugin{ - ServerType: "dns", - Action: setup, - }) -} +func init() { plugin.Register("root", setup) } func setup(c *caddy.Controller) error { config := dnsserver.GetConfig(c) diff --git a/plugin/tls/tls.go b/plugin/tls/tls.go index 3231e9381..bfde8cb2a 100644 --- a/plugin/tls/tls.go +++ b/plugin/tls/tls.go @@ -10,12 +10,7 @@ import ( "github.com/caddyserver/caddy" ) -func init() { - caddy.RegisterPlugin("tls", caddy.Plugin{ - ServerType: "dns", - Action: setup, - }) -} +func init() { plugin.Register("tls", setup) } func setup(c *caddy.Controller) error { err := parseTLS(c)