global: use Go 1.18's netip helpers

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2021-11-05 01:52:54 +01:00
parent 23d4e52ac9
commit b51df10251
21 changed files with 41 additions and 58 deletions

View File

@@ -10,10 +10,9 @@ import (
"errors"
"math/bits"
"net"
"net/netip"
"sync"
"unsafe"
"golang.zx2c4.com/go118/netip"
)
type parentIndirection struct {

View File

@@ -8,10 +8,9 @@ package device
import (
"math/rand"
"net"
"net/netip"
"sort"
"testing"
"golang.zx2c4.com/go118/netip"
)
const (

View File

@@ -8,9 +8,8 @@ package device
import (
"math/rand"
"net"
"net/netip"
"testing"
"golang.zx2c4.com/go118/netip"
)
type testPairCommonBits struct {

View File

@@ -11,6 +11,7 @@ import (
"fmt"
"io"
"math/rand"
"net/netip"
"runtime"
"runtime/pprof"
"sync"
@@ -18,7 +19,6 @@ import (
"testing"
"time"
"golang.zx2c4.com/go118/netip"
"golang.zx2c4.com/wireguard/conn"
"golang.zx2c4.com/wireguard/conn/bindtest"
"golang.zx2c4.com/wireguard/tun/tuntest"

View File

@@ -7,8 +7,7 @@ package device
import (
"math/rand"
"golang.zx2c4.com/go118/netip"
"net/netip"
)
type DummyEndpoint struct {

View File

@@ -17,6 +17,7 @@ import (
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
"golang.zx2c4.com/wireguard/conn"
)

View File

@@ -10,6 +10,7 @@ import (
"encoding/binary"
"errors"
"net"
"net/netip"
"os"
"sync"
"sync/atomic"

View File

@@ -12,13 +12,13 @@ import (
"fmt"
"io"
"net"
"net/netip"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"golang.zx2c4.com/go118/netip"
"golang.zx2c4.com/wireguard/ipc"
)