all: import x/exp/maps as xmaps to distinguish from Go 1.21 "maps"

Updates #8419

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2023-08-17 09:40:19 -07:00 committed by Brad Fitzpatrick
parent e8551d6b40
commit bc0eb6b914
6 changed files with 11 additions and 11 deletions

View File

@ -14,7 +14,7 @@ import (
"text/tabwriter"
"github.com/peterbourgon/ff/v3/ffcli"
"golang.org/x/exp/maps"
xmaps "golang.org/x/exp/maps"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"tailscale.com/util/cmpx"
@ -181,7 +181,7 @@ func filterFormatAndSortExitNodes(peers []*ipnstate.PeerStatus, filterBy string)
}
filteredExitNodes := filteredExitNodes{
Countries: maps.Values(countries),
Countries: xmaps.Values(countries),
}
for _, country := range filteredExitNodes.Countries {

View File

@ -22,7 +22,7 @@ import (
"strings"
"time"
"golang.org/x/exp/maps"
xmaps "golang.org/x/exp/maps"
"tailscale.com/cmd/testwrapper/flakytest"
)
@ -270,7 +270,7 @@ func main() {
if len(toRetry) == 0 {
continue
}
pkgs := maps.Keys(toRetry)
pkgs := xmaps.Keys(toRetry)
sort.Strings(pkgs)
nextRun := &nextRun{
attempt: thisRun.attempt + 1,

View File

@ -6,10 +6,10 @@ package osdiag
import (
"errors"
"fmt"
"maps"
"strings"
"testing"
"golang.org/x/exp/maps"
"golang.org/x/sys/windows/registry"
)

View File

@ -14,7 +14,7 @@ import (
"github.com/google/go-cmp/cmp"
"go4.org/netipx"
"golang.org/x/exp/maps"
xmaps "golang.org/x/exp/maps"
"tailscale.com/net/packet"
"tailscale.com/net/tsaddr"
"tailscale.com/tailcfg"
@ -945,7 +945,7 @@ func TestCaps(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := maps.Keys(filt.CapsWithValues(netip.MustParseAddr(tt.src), netip.MustParseAddr(tt.dst)))
got := xmaps.Keys(filt.CapsWithValues(netip.MustParseAddr(tt.src), netip.MustParseAddr(tt.dst)))
slices.Sort(got)
slices.Sort(tt.want)
if !slices.Equal(got, tt.want) {

View File

@ -20,7 +20,7 @@ import (
"time"
"golang.org/x/crypto/poly1305"
"golang.org/x/exp/maps"
xmaps "golang.org/x/exp/maps"
"tailscale.com/disco"
"tailscale.com/ipn/ipnstate"
"tailscale.com/net/stun"
@ -313,7 +313,7 @@ func (de *endpoint) addrForWireGuardSendLocked(now mono.Time) (udpAddr netip.Add
return udpAddr, false
}
candidates := maps.Keys(de.endpointState)
candidates := xmaps.Keys(de.endpointState)
if len(candidates) == 0 {
de.c.logf("magicsock: addrForSendWireguardLocked: [unexpected] no candidates available for endpoint")
return udpAddr, false

View File

@ -31,7 +31,7 @@ import (
"github.com/tailscale/wireguard-go/device"
"github.com/tailscale/wireguard-go/tun/tuntest"
"go4.org/mem"
"golang.org/x/exp/maps"
xmaps "golang.org/x/exp/maps"
"golang.org/x/net/icmp"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
@ -1081,7 +1081,7 @@ func testTwoDevicePing(t *testing.T, d *devices) {
}
}
t.Helper()
t.Errorf("missing any connection to %s from %s", wantConns, maps.Keys(stats))
t.Errorf("missing any connection to %s from %s", wantConns, xmaps.Keys(stats))
}
addrPort := netip.MustParseAddrPort