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
@@ -11,6 +11,7 @@ import (
"os"
"path/filepath"
"runtime"
"slices"
"strconv"
"strings"
@@ -19,7 +20,6 @@ import (
"github.com/pkg/diff"
"github.com/pkg/diff/write"
"golang.org/x/exp/constraints"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/cli/cliui"
+1 -1
View File
@@ -4,11 +4,11 @@ import (
"context"
"fmt"
"io"
"slices"
"strings"
"time"
"github.com/google/uuid"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"github.com/coder/pretty"
+1 -1
View File
@@ -12,6 +12,7 @@ import (
"net/url"
"os"
"os/signal"
"slices"
"strconv"
"strings"
"sync"
@@ -21,7 +22,6 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"go.opentelemetry.io/otel/trace"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"cdr.dev/slog"
+1 -1
View File
@@ -17,6 +17,7 @@ import (
"path/filepath"
"runtime"
"runtime/trace"
"slices"
"strings"
"sync"
"syscall"
@@ -25,7 +26,6 @@ import (
"github.com/mattn/go-isatty"
"github.com/mitchellh/go-wordwrap"
"golang.org/x/exp/slices"
"golang.org/x/mod/semver"
"golang.org/x/xerrors"
+1 -1
View File
@@ -3,10 +3,10 @@ package cli
import (
"fmt"
"os"
"slices"
"strings"
"time"
"golang.org/x/exp/slices"
"golang.org/x/xerrors"
"github.com/coder/coder/v2/cli/cliui"