Some files already use "slices", others use "cmd/go/internal/slices".
(Some files are using more than slices.Clip and must use "slices".)
Use "slices" consistently and delete cmd/go/internal/slices.
Change-Id: I69ec680106ad2924276f7473e6547a3a907efc96
Reviewed-on: https://go-review.googlesource.com/c/go/+/499715
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
"os/exec"
"path/filepath"
"regexp"
+ "slices"
"strconv"
"strings"
"cmd/go/internal/cfg"
"cmd/go/internal/load"
"cmd/go/internal/modload"
- "cmd/go/internal/slices"
"cmd/go/internal/str"
"cmd/go/internal/work"
)
"os"
"path"
"path/filepath"
+ "slices"
"strconv"
"strings"
"sync"
"cmd/go/internal/modconv"
"cmd/go/internal/modfetch"
"cmd/go/internal/search"
- "cmd/go/internal/slices"
"golang.org/x/mod/modfile"
"golang.org/x/mod/module"
"io/fs"
"os"
pathpkg "path"
+ "slices"
"sort"
"strings"
"sync"
"cmd/go/internal/modfetch/codehost"
"cmd/go/internal/modinfo"
"cmd/go/internal/search"
- "cmd/go/internal/slices"
"cmd/go/internal/str"
"cmd/go/internal/trace"
"cmd/internal/pkgpattern"
package mvs
import (
- "cmd/go/internal/gover"
- "cmd/go/internal/slices"
"fmt"
+ "slices"
+
+ "cmd/go/internal/gover"
"golang.org/x/mod/module"
)
+++ /dev/null
-// Copyright 2023 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO: Replace with slices package when it lands in standard library.
-
-package slices
-
-// Clip removes unused capacity from the slice, returning s[:len(s):len(s)].
-func Clip[S ~[]E, E any](s S) S {
- return s[:len(s):len(s)]
-}
"os/exec"
"path/filepath"
"regexp"
+ "slices"
"strconv"
"strings"
"sync"
"cmd/go/internal/lockedfile"
"cmd/go/internal/modload"
"cmd/go/internal/search"
- "cmd/go/internal/slices"
"cmd/go/internal/str"
"cmd/go/internal/trace"
"cmd/go/internal/work"
package vcweb
import (
- "cmd/go/internal/slices"
"log"
"net/http"
"net/http/cgi"
"os/exec"
"runtime"
+ "slices"
"sync"
)
import (
"bufio"
- "cmd/go/internal/slices"
"context"
"errors"
"io"
"net/url"
"os"
"os/exec"
+ "slices"
"strings"
"sync"
"time"
"path/filepath"
"regexp"
"runtime"
+ "slices"
"sort"
"strconv"
"strings"
"cmd/go/internal/gover"
"cmd/go/internal/load"
"cmd/go/internal/modload"
- "cmd/go/internal/slices"
"cmd/go/internal/str"
"cmd/go/internal/trace"
"cmd/internal/buildid"