diff options
author | 2018-07-28 17:32:13 +0800 | |
---|---|---|
committer | 2018-07-28 10:32:13 +0100 | |
commit | 54ec78c1ba918b98ac9b9c5b1334c9d170502119 (patch) | |
tree | 65c80cb2c6f886855183532350aedc02e3ca8ee4 /plugin/secondary | |
parent | 62df253371f354200a3efde9e86e80eb50a2441b (diff) | |
download | coredns-54ec78c1ba918b98ac9b9c5b1334c9d170502119.tar.gz coredns-54ec78c1ba918b98ac9b9c5b1334c9d170502119.tar.zst coredns-54ec78c1ba918b98ac9b9c5b1334c9d170502119.zip |
Fix ineffassign (#1959)
* Fix ineffassign
This fix tries to fix ineffassign, as was reported in:
https://goreportcard.com/report/github.com/coredns/coredns#ineffassign
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update setup.go
Revert this one change, so this can be merged.
Diffstat (limited to 'plugin/secondary')
-rw-r--r-- | plugin/secondary/setup.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugin/secondary/setup.go b/plugin/secondary/setup.go index 1a4115831..20dc184ca 100644 --- a/plugin/secondary/setup.go +++ b/plugin/secondary/setup.go @@ -49,13 +49,12 @@ func setup(c *caddy.Controller) error { func secondaryParse(c *caddy.Controller) (file.Zones, error) { z := make(map[string]*file.Zone) names := []string{} - origins := []string{} upstr := upstream.Upstream{} for c.Next() { if c.Val() == "secondary" { // secondary [origin] - origins = make([]string, len(c.ServerBlockKeys)) + origins := make([]string, len(c.ServerBlockKeys)) copy(origins, c.ServerBlockKeys) args := c.RemainingArgs() if len(args) > 0 { |