mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-01 03:04:07 +09:00
all: adopt slices helpers
This commit is contained in:
1 parent
60f0544b78
commit
ac725f27e4
18 files changed
+94
-166
No files matched your search
@@ -18,7 +18,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -1295,8 +1295,8 @@ func (t *HeadscaleInContainer) ListNodes(
|
||||
}
|
||||
}
|
||||
|
||||
sort.Slice(ret, func(i, j int) bool {
|
||||
return cmp.Compare(ret[i].GetId(), ret[j].GetId()) == -1
|
||||
slices.SortFunc(ret, func(a, b *v1.Node) int {
|
||||
return cmp.Compare(a.GetId(), b.GetId())
|
||||
})
|
||||
|
||||
return ret, nil
|
||||
|
||||
Reference in new issue
Block a user