diff options
| author | apocelipes <seve3r@outlook.com> | 2024-03-22 09:04:08 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-03-22 16:38:19 +0000 |
| commit | 1eee17dc4e796c2fe60e8f9e82b66c00610adc31 (patch) | |
| tree | 7d7ed4d4c20e3fe4a35ac52093c8924b53fdef12 /src/path/filepath/path_test.go | |
| parent | 1c864333cac25273ebfcefa53d50a82c270ebdab (diff) | |
| download | go-1eee17dc4e796c2fe60e8f9e82b66c00610adc31.tar.xz | |
path/filepath: use slices to simplify the test code
Change-Id: I020ca2ed8a6af60977f2c492cd742f824906d4ec
GitHub-Last-Rev: b27fda463058e86eafbe5bd10e5c99e10dd609a8
GitHub-Pull-Request: golang/go#66462
Reviewed-on: https://go-review.googlesource.com/c/go/+/573715
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/path/filepath/path_test.go')
| -rw-r--r-- | src/path/filepath/path_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/path/filepath/path_test.go b/src/path/filepath/path_test.go index 8a66538f6a..b24f39c5aa 100644 --- a/src/path/filepath/path_test.go +++ b/src/path/filepath/path_test.go @@ -14,7 +14,6 @@ import ( "reflect" "runtime" "slices" - "sort" "strings" "syscall" "testing" @@ -1790,7 +1789,7 @@ func testWalkSymlink(t *testing.T, mklink func(target, link string) error) { if err != nil { t.Fatal(err) } - sort.Strings(visited) + slices.Sort(visited) want := []string{".", "link"} if fmt.Sprintf("%q", visited) != fmt.Sprintf("%q", want) { t.Errorf("unexpected paths visited %q, want %q", visited, want) |
