diff options
Diffstat (limited to 'plugin/hosts/setup.go')
-rw-r--r-- | plugin/hosts/setup.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plugin/hosts/setup.go b/plugin/hosts/setup.go index 1b281b9a3..35b0c5483 100644 --- a/plugin/hosts/setup.go +++ b/plugin/hosts/setup.go @@ -9,6 +9,7 @@ import ( "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" + "github.com/coredns/coredns/plugin/pkg/fall" "github.com/mholt/caddy" ) @@ -105,14 +106,10 @@ func hostsParse(c *caddy.Controller) (Hosts, error) { for c.NextBlock() { switch c.Val() { case "fallthrough": - args := c.RemainingArgs() - if len(args) == 0 { - h.Fallthrough = true - continue - } - return h, c.ArgErr() + h.Fall = fall.New() + h.Fall.SetZones(c.RemainingArgs()) default: - if !h.Fallthrough { + if h.Fall.IsNil() { line := strings.Join(append([]string{c.Val()}, c.RemainingArgs()...), " ") inline = append(inline, line) continue |