mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
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.
This commit is contained in:
@@ -53,7 +53,6 @@ func setup(c *caddy.Controller) error {
|
||||
func fileParse(c *caddy.Controller) (Zones, error) {
|
||||
z := make(map[string]*Zone)
|
||||
names := []string{}
|
||||
origins := []string{}
|
||||
|
||||
config := dnsserver.GetConfig(c)
|
||||
|
||||
@@ -64,7 +63,7 @@ func fileParse(c *caddy.Controller) (Zones, error) {
|
||||
}
|
||||
fileName := c.Val()
|
||||
|
||||
origins = make([]string, len(c.ServerBlockKeys))
|
||||
origins := make([]string, len(c.ServerBlockKeys))
|
||||
copy(origins, c.ServerBlockKeys)
|
||||
args := c.RemainingArgs()
|
||||
if len(args) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user