Skip to content

Commit

Permalink
cmd/go: delete cmd/go/internal/slices in favor of slices
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rsc authored and gopherbot committed Jun 1, 2023
1 parent abdaa0f commit b100e12
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/cmd/go/internal/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import (
"os/exec"
"path/filepath"
"regexp"
"slices"
"strconv"
"strings"

"cmd/go/internal/base"
"cmd/go/internal/cfg"
"cmd/go/internal/load"
"cmd/go/internal/modload"
"cmd/go/internal/slices"
"cmd/go/internal/str"
"cmd/go/internal/work"
)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modload/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"os"
"path"
"path/filepath"
"slices"
"strconv"
"strings"
"sync"
Expand All @@ -26,7 +27,6 @@ import (
"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"
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modload/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"io/fs"
"os"
pathpkg "path"
"slices"
"sort"
"strings"
"sync"
Expand All @@ -24,7 +25,6 @@ import (
"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"
Expand Down
5 changes: 3 additions & 2 deletions src/cmd/go/internal/mvs/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
package mvs

import (
"cmd/go/internal/gover"
"cmd/go/internal/slices"
"fmt"
"slices"

"cmd/go/internal/gover"

"golang.org/x/mod/module"
)
Expand Down
12 changes: 0 additions & 12 deletions src/cmd/go/internal/slices/slices.go

This file was deleted.

2 changes: 1 addition & 1 deletion src/cmd/go/internal/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"os/exec"
"path/filepath"
"regexp"
"slices"
"strconv"
"strings"
"sync"
Expand All @@ -28,7 +29,6 @@ import (
"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"
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/vcweb/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
package vcweb

import (
"cmd/go/internal/slices"
"log"
"net/http"
"net/http/cgi"
"os/exec"
"runtime"
"slices"
"sync"
)

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/vcweb/hg.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package vcweb

import (
"bufio"
"cmd/go/internal/slices"
"context"
"errors"
"io"
Expand All @@ -16,6 +15,7 @@ import (
"net/url"
"os"
"os/exec"
"slices"
"strings"
"sync"
"time"
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/work/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"path/filepath"
"regexp"
"runtime"
"slices"
"sort"
"strconv"
"strings"
Expand All @@ -38,7 +39,6 @@ import (
"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"
Expand Down

0 comments on commit b100e12

Please sign in to comment.