patch setup (#2675)

* patch setup

Use a more streamlined grammar

* fix break

No need to break out in this for loop
This commit is contained in:
MengZeLee
2019-03-18 15:17:46 +08:00
committed by Miek Gieben
parent 287e280106
commit 4405661520

View File

@@ -59,8 +59,7 @@ func etcdParse(c *caddy.Controller) (*Etcd, error) {
etc.Zones[i] = plugin.Host(str).Normalize() etc.Zones[i] = plugin.Host(str).Normalize()
} }
if c.NextBlock() { for c.NextBlock() {
for {
switch c.Val() { switch c.Val() {
case "stubzones": case "stubzones":
// ignored, remove later. // ignored, remove later.
@@ -103,12 +102,6 @@ func etcdParse(c *caddy.Controller) (*Etcd, error) {
return &Etcd{}, c.Errf("unknown property '%s'", c.Val()) return &Etcd{}, c.Errf("unknown property '%s'", c.Val())
} }
} }
if !c.Next() {
break
}
}
} }
client, err := newEtcdClient(endpoints, tlsConfig, username, password) client, err := newEtcdClient(endpoints, tlsConfig, username, password)
if err != nil { if err != nil {