mirror of
https://github.com/juanfont/headscale.git
synced 2025-05-18 01:16:48 +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"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"slices"
|
||||||
|
|
||||||
xmaps "golang.org/x/exp/maps"
|
xmaps "golang.org/x/exp/maps"
|
||||||
"tailscale.com/tailcfg"
|
"tailscale.com/tailcfg"
|
||||||
"tailscale.com/util/set"
|
"tailscale.com/util/set"
|
||||||
@ -31,9 +33,7 @@ func tailscaleVersSorted() []string {
|
|||||||
|
|
||||||
func capVersSorted() []tailcfg.CapabilityVersion {
|
func capVersSorted() []tailcfg.CapabilityVersion {
|
||||||
capVers := xmaps.Keys(capVerToTailscaleVer)
|
capVers := xmaps.Keys(capVerToTailscaleVer)
|
||||||
sort.Slice(capVers, func(i, j int) bool {
|
slices.Sort(capVers)
|
||||||
return capVers[i] < capVers[j]
|
|
||||||
})
|
|
||||||
return capVers
|
return capVers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user