*Resolver) LookupNetIP(ctx context.Context, network, host string) ([]netip.Addr, error) { // TODO(bradfitz): make this efficient, making the internal net package // type throughout be netip.Addr and only converting to the net.IP slice // version at the edge. But for now (2021-10-20), this is a wrapper around // the old way. ips, err := r.LookupIP(ctx, network, host) if err != nil { return nil, err } ret := make([]netip.Addr, 0, len(ips)) for _, ip := range ips { if a, ok := netip.AddrFromSlice(ip); ok { ret = append(ret, a) } } return ret, nil }