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

@@ -4,7 +4,7 @@ import (
"context"
"errors"
"fmt"
"net"
"net/netip"
"sort"
"github.com/qdm12/gluetun/internal/constants/vpn"
@@ -13,7 +13,6 @@ import (
)
var (
ErrParseIP = errors.New("cannot parse IP address")
ErrNotIPv4 = errors.New("IP address is not IPv4")
)
@@ -47,7 +46,7 @@ func (u *Updater) FetchServers(ctx context.Context, minServers int) (
Region: jsonServer.Country,
Hostname: jsonServer.Domain,
Number: number,
IPs: []net.IP{ip},
IPs: []netip.Addr{ip},
TCP: jsonServer.Features.TCP,
UDP: jsonServer.Features.UDP,
}