refactor: replace golang.org/x/exp/slices with slices (#16772)

The experimental functions in `golang.org/x/exp/slices` are now
available in the standard library since Go 1.21.

Reference: https://go.dev/doc/go1.21#slices

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun
2025-03-04 00:46:49 +11:00
committed by GitHub
parent 88f0131abb
commit 04c33968cf
52 changed files with 53 additions and 55 deletions
+1 -1
View File
@@ -2,12 +2,12 @@ package agentsdk
import (
"context"
"slices"
"testing"
"time"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
protobuf "google.golang.org/protobuf/proto"
+1 -1
View File
@@ -4,13 +4,13 @@ import (
"context"
"fmt"
"net/http"
"slices"
"testing"
"time"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/agentsdk"
@@ -3,11 +3,11 @@ package healthsdk
import (
"net"
"net/netip"
"slices"
"strings"
"testing"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
"tailscale.com/net/interfaces"
"github.com/coder/coder/v2/coderd/healthcheck/health"
+1 -1
View File
@@ -7,13 +7,13 @@ import (
"io"
"net/http"
"net/http/cookiejar"
"slices"
"strings"
"time"
"github.com/google/uuid"
"github.com/hashicorp/yamux"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/buildinfo"