mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04: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
@@ -244,8 +244,8 @@ func (h *Hostsfile) LookupStaticAddr(addr string) []string {
|
||||
|
||||
h.RLock()
|
||||
defer h.RUnlock()
|
||||
hosts1, _ := h.hmap.addr[addr]
|
||||
hosts2, _ := h.inline.addr[addr]
|
||||
hosts1 := h.hmap.addr[addr]
|
||||
hosts2 := h.inline.addr[addr]
|
||||
|
||||
if len(hosts1) == 0 && len(hosts2) == 0 {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user