23 lines
430 B
Go
23 lines
430 B
Go
package meship
|
|
|
|
import (
|
|
"github.com/coredns/caddy"
|
|
"github.com/coredns/coredns/core/dnsserver"
|
|
"github.com/coredns/coredns/plugin"
|
|
)
|
|
|
|
func init() { plugin.Register("meship", setup) }
|
|
|
|
func setup(c *caddy.Controller) error {
|
|
c.Next() // 'meship'
|
|
if c.NextArg() {
|
|
return plugin.Error("meship", c.ArgErr())
|
|
}
|
|
|
|
dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {
|
|
return Meship{}
|
|
})
|
|
|
|
return nil
|
|
}
|