mirror of
https://github.com/coredns/coredns.git
synced 2025-12-06 10:25:10 -05:00
Remove the word middleware (#1067)
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat
This commit is contained in:
24
plugin/bind/setup.go
Normal file
24
plugin/bind/setup.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package bind
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/coredns/coredns/core/dnsserver"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
||||
func setupBind(c *caddy.Controller) error {
|
||||
config := dnsserver.GetConfig(c)
|
||||
for c.Next() {
|
||||
if !c.Args(&config.ListenHost) {
|
||||
return plugin.Error("bind", c.ArgErr())
|
||||
}
|
||||
}
|
||||
if net.ParseIP(config.ListenHost) == nil {
|
||||
return plugin.Error("bind", fmt.Errorf("not a valid IP address: %s", config.ListenHost))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user