1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-05-14 01:17:07 +02:00

replace old sort func

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2025-04-11 12:46:02 +02:00
parent cfd44e0e03
commit e4e421444d
No known key found for this signature in database

View File

@ -4,6 +4,8 @@ import (
"sort"
"strings"
"slices"
xmaps "golang.org/x/exp/maps"
"tailscale.com/tailcfg"
"tailscale.com/util/set"
@ -31,9 +33,7 @@ func tailscaleVersSorted() []string {
func capVersSorted() []tailcfg.CapabilityVersion {
capVers := xmaps.Keys(capVerToTailscaleVer)
sort.Slice(capVers, func(i, j int) bool {
return capVers[i] < capVers[j]
})
slices.Sort(capVers)
return capVers
}