chore(all): replace net.IP with netip.Addr

This commit is contained in:
Quentin McGaw
2023-05-20 19:58:18 +00:00
parent 00ee6ff9a7
commit 0a29337c3b
91 changed files with 525 additions and 590 deletions

View File

@@ -2,7 +2,7 @@ package ipinfo
import (
"context"
"net"
"net/netip"
)
// FetchMultiInfo obtains the public IP address information for every IP
@@ -11,7 +11,7 @@ import (
// If an error is encountered, all the operations are canceled and
// an error is returned, so the results returned should be considered
// incomplete in this case.
func (f *Fetch) FetchMultiInfo(ctx context.Context, ips []net.IP) (
func (f *Fetch) FetchMultiInfo(ctx context.Context, ips []netip.Addr) (
results []Response, err error) {
ctx, cancel := context.WithCancel(ctx)
@@ -23,7 +23,7 @@ func (f *Fetch) FetchMultiInfo(ctx context.Context, ips []net.IP) (
resultsCh := make(chan asyncResult)
for i, ip := range ips {
go func(index int, ip net.IP) {
go func(index int, ip netip.Addr) {
aResult := asyncResult{
index: index,
}