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()
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user