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