mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
all: use new Go 1.23 slices.Sorted more
Updates #12912 Change-Id: If1294e5bc7b5d3cf0067535ae10db75e8b988d8b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
fd6686d81a
commit
3d401c11fa
@@ -7,12 +7,12 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"maps"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/netip"
|
||||
"reflect"
|
||||
"slices"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -593,13 +593,7 @@ func TestMakeProbePlan(t *testing.T) {
|
||||
|
||||
func (plan probePlan) String() string {
|
||||
var sb strings.Builder
|
||||
keys := []string{}
|
||||
for k := range plan {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
|
||||
for _, key := range keys {
|
||||
for _, key := range slices.Sorted(maps.Keys(plan)) {
|
||||
fmt.Fprintf(&sb, "[%s]", key)
|
||||
pv := plan[key]
|
||||
for _, p := range pv {
|
||||
|
Reference in New Issue
Block a user