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
@@ -4,13 +4,13 @@ import (
"context"
"database/sql"
"encoding/json"
"slices"
"strings"
"sync"
"time"
"github.com/cenkalti/backoff/v4"
"github.com/google/uuid"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"cdr.dev/slog"
+1 -1
View File
@@ -5,6 +5,7 @@ import (
"database/sql"
"encoding/json"
"fmt"
"slices"
"strings"
"sync"
"testing"
@@ -15,7 +16,6 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
"golang.org/x/exp/slices"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbmem"
@@ -9,6 +9,7 @@ import (
"net/http"
"net/url"
"reflect"
"slices"
"sort"
"strconv"
"strings"
@@ -20,7 +21,6 @@ import (
semconv "go.opentelemetry.io/otel/semconv/v1.14.0"
"go.opentelemetry.io/otel/trace"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"golang.org/x/oauth2"
"golang.org/x/xerrors"
protobuf "google.golang.org/protobuf/proto"