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:
parent
cfd44e0e03
commit
e4e421444d
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user