Commit 44056615 authored by MengZeLee's avatar MengZeLee Committed by Miek Gieben

patch setup (#2675)

* patch setup

Use a more streamlined grammar

* fix break

No need to break out in this for loop
parent 287e2801
...@@ -59,8 +59,7 @@ func etcdParse(c *caddy.Controller) (*Etcd, error) { ...@@ -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) { ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment