From bb2a5f0556fd6bb4dbbce5eef2d6317d20796ade Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 21 May 2024 21:07:32 -0700 Subject: cmd: change from sort functions to slices functions Doing this because the slices functions are slightly faster and slightly easier to use. It also removes one dependency layer. We did this outside of bootstrap tools in CL 587655. Now that the bootstrap compiler is 1.22, we can do this in more code. Change-Id: I9ed2dd473758cacd14f76a0639368523ccdff72f Reviewed-on: https://go-review.googlesource.com/c/go/+/626038 Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: Damien Neil --- src/cmd/api/api_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/api/api_test.go') diff --git a/src/cmd/api/api_test.go b/src/cmd/api/api_test.go index ba358d364d..7848233333 100644 --- a/src/cmd/api/api_test.go +++ b/src/cmd/api/api_test.go @@ -11,7 +11,7 @@ import ( "internal/testenv" "os" "path/filepath" - "sort" + "slices" "strings" "sync" "testing" @@ -77,7 +77,7 @@ func TestGolden(t *testing.T) { t.Fatalf("opening golden.txt for package %q: %v", fi.Name(), err) } wanted := strings.Split(string(bs), "\n") - sort.Strings(wanted) + slices.Sort(wanted) for _, feature := range wanted { if feature == "" { continue -- cgit v1.3