Simplify plugin/pkg/fall (#1358)

* Simplify plugin/pkg/fall

* Remove unused import

* Fix fall_test

* Get fall coverage to 100% just because

* gofmt. sigh.
This commit is contained in:
John Belamaric
2018-01-07 14:51:32 -05:00
committed by GitHub
parent c6febe6250
commit c59f5f6e86
13 changed files with 117 additions and 142 deletions

View File

@@ -34,7 +34,7 @@ func setupReverse(c *caddy.Controller) error {
return nil
}
func reverseParse(c *caddy.Controller) (nets networks, f *fall.F, err error) {
func reverseParse(c *caddy.Controller) (nets networks, f fall.F, err error) {
zones := make([]string, len(c.ServerBlockKeys))
wildcard := false
@@ -87,8 +87,7 @@ func reverseParse(c *caddy.Controller) (nets networks, f *fall.F, err error) {
wildcard = true
case "fallthrough":
f = fall.New()
f.SetZones(c.RemainingArgs())
f.SetZonesFromArgs(c.RemainingArgs())
default:
return nil, f, c.ArgErr()