all: use Go 1.21 slices, maps instead of x/exp/{slices,maps}

Updates #8419

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2023-08-16 22:09:53 -07:00
committed by Brad Fitzpatrick
parent e8d140654a
commit e8551d6b40
47 changed files with 61 additions and 65 deletions

View File

@@ -27,12 +27,12 @@ import (
"os"
"path/filepath"
"runtime"
"slices"
"strings"
"sync"
"time"
"github.com/tailscale/golang-x-crypto/acme"
"golang.org/x/exp/slices"
"tailscale.com/atomicfile"
"tailscale.com/envknob"
"tailscale.com/hostinfo"

View File

@@ -18,7 +18,6 @@ import (
"time"
"github.com/google/go-cmp/cmp"
"golang.org/x/exp/maps"
"tailscale.com/ipn/store/mem"
)
@@ -112,7 +111,7 @@ func TestShouldStartDomainRenewal(t *testing.T) {
reset := func() {
renewMu.Lock()
defer renewMu.Unlock()
maps.Clear(renewCertAt)
clear(renewCertAt)
}
mustMakePair := func(template *x509.Certificate) *TLSCertKeyPair {

View File

@@ -20,6 +20,7 @@ import (
"os/user"
"path/filepath"
"runtime"
"slices"
"sort"
"strconv"
"strings"
@@ -29,7 +30,6 @@ import (
"go4.org/mem"
"go4.org/netipx"
"golang.org/x/exp/slices"
"gvisor.dev/gvisor/pkg/tcpip"
"tailscale.com/client/tailscale/apitype"
"tailscale.com/control/controlclient"

View File

@@ -22,6 +22,7 @@ import (
"path"
"path/filepath"
"runtime"
"slices"
"sort"
"strconv"
"strings"
@@ -32,7 +33,6 @@ import (
"unicode/utf8"
"github.com/kortschak/wol"
"golang.org/x/exp/slices"
"golang.org/x/net/dns/dnsmessage"
"golang.org/x/net/http/httpguts"
"tailscale.com/client/tailscale/apitype"

View File

@@ -10,10 +10,10 @@ import (
"math/rand"
"net/netip"
"runtime"
"slices"
"strings"
"time"
"golang.org/x/exp/slices"
"tailscale.com/envknob"
"tailscale.com/ipn"
"tailscale.com/types/logger"

View File

@@ -17,12 +17,12 @@ import (
"net/url"
"os"
"path"
"slices"
"strconv"
"strings"
"sync"
"time"
"golang.org/x/exp/slices"
"tailscale.com/ipn"
"tailscale.com/logtail/backoff"
"tailscale.com/net/netutil"

View File

@@ -20,12 +20,12 @@ import (
"os/exec"
"path/filepath"
"runtime"
"slices"
"strings"
"sync"
"github.com/tailscale/golang-x-crypto/ssh"
"go4.org/mem"
"golang.org/x/exp/slices"
"tailscale.com/tailcfg"
"tailscale.com/util/lineread"
"tailscale.com/util/mak"

View File

@@ -20,12 +20,12 @@ import (
"net/netip"
"net/url"
"runtime"
"slices"
"strconv"
"strings"
"sync"
"time"
"golang.org/x/exp/slices"
"tailscale.com/client/tailscale/apitype"
"tailscale.com/envknob"
"tailscale.com/health"

View File

@@ -9,10 +9,10 @@ import (
"net"
"net/netip"
"net/url"
"slices"
"strconv"
"strings"
"golang.org/x/exp/slices"
"tailscale.com/tailcfg"
)