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:
Guangming Wang
2019-09-25 20:23:43 +08:00
committed by Miek Gieben
parent 47719756fe
commit eb59e79207
5 changed files with 6 additions and 10 deletions

View File

@@ -45,8 +45,8 @@ func (x Xfr) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (in
ch := make(chan *dns.Envelope)
tr := new(dns.Transfer)
wg := new(sync.WaitGroup)
wg.Add(1)
go func() {
wg.Add(1)
tr.Out(w, r, ch)
wg.Done()
}()