Closed
Description
Go 1.18 includes the new net/netip
package with value types related to IP addresses and networks.
Perhaps, new methods should be added, for example Reader.LookupAddr(ip netip.Addr, result any)
and Reader.Prefixes
with a corresponding iterator, that would encourage the use of the new IP types. I think, it could also reduce some of the boilerplate such as:
Lines 247 to 250 in ccd731c
and a lot of len(ip) == net.IPv4len
and ip.To4() == nil
.
Metadata
Metadata
Assignees
Labels
No labels