mirror of
https://github.com/coredns/coredns.git
synced 2025-11-26 21:54:03 -05:00
plugin: cleanup code based on staticcheck warnings (#3302)
TrimPrefix re-assign to former variable Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
This commit is contained in:
committed by
Miek Gieben
parent
47719756fe
commit
eb59e79207
@@ -27,9 +27,7 @@ func (t *testResponseWriter) WriteMsg(m *dns.Msg) error {
|
||||
|
||||
func NewTestControllerWithZones(input string, zones []string) *caddy.Controller {
|
||||
ctr := caddy.NewTestController("dns", input)
|
||||
for _, zone := range zones {
|
||||
ctr.ServerBlockKeys = append(ctr.ServerBlockKeys, zone)
|
||||
}
|
||||
ctr.ServerBlockKeys = append(ctr.ServerBlockKeys, zones...)
|
||||
return ctr
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user