mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user