all: remove redundant conversions and import names (#21903)

This commit is contained in:
Alex Prut
2020-11-25 21:00:23 +01:00
committed by GitHub
parent f59ed3565d
commit 810f9e057d
44 changed files with 66 additions and 67 deletions

View File

@ -163,7 +163,7 @@ func splitNodeItemKey(key []byte) (id ID, ip net.IP, field string) {
}
key = key[len(dbDiscoverRoot)+1:]
// Split out the IP.
ip = net.IP(key[:16])
ip = key[:16]
if ip4 := ip.To4(); ip4 != nil {
ip = ip4
}