net/dnscache: use net/netip

Removes usage of net.IP and net.IPAddr where possible from net/dnscache.

Fixes #5282

Signed-off-by: Kris Brandow <kris.brandow@gmail.com>
This commit is contained in:
Kris Brandow
2022-08-16 14:45:46 -04:00
parent ba3cc08b62
commit 19008a3023
2 changed files with 44 additions and 67 deletions

View File

@ -131,7 +131,7 @@ func TestResolverAllHostStaticResult(t *testing.T) {
if got, want := ip6.String(), "2001:4860:4860::8888"; got != want {
t.Errorf("ip4 got %q; want %q", got, want)
}
if got, want := fmt.Sprintf("%q", allIPs), `[{"2001:4860:4860::8888" ""} {"2001:4860:4860::8844" ""} {"8.8.8.8" ""} {"8.8.4.4" ""}]`; got != want {
if got, want := fmt.Sprintf("%q", allIPs), `["2001:4860:4860::8888" "2001:4860:4860::8844" "8.8.8.8" "8.8.4.4"]`; got != want {
t.Errorf("allIPs got %q; want %q", got, want)
}