diff options
Diffstat (limited to 'core/setup/bindhost.go')
-rw-r--r-- | core/setup/bindhost.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/setup/bindhost.go b/core/setup/bindhost.go new file mode 100644 index 000000000..a3c07e5eb --- /dev/null +++ b/core/setup/bindhost.go @@ -0,0 +1,13 @@ +package setup + +import "github.com/miekg/coredns/middleware" + +// BindHost sets the host to bind the listener to. +func BindHost(c *Controller) (middleware.Middleware, error) { + for c.Next() { + if !c.Args(&c.BindHost) { + return nil, c.ArgErr() + } + } + return nil, nil +} |