Skip to content

Commit 41f26a4

Browse files
authored
refactor: replace sort.Slice with slices.Sort for natural ordering (#5218)
Signed-off-by: zhoujiaweii <[email protected]>
1 parent ca6e040 commit 41f26a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/manifest/mantaray/walker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package mantaray
66

77
import (
88
"context"
9-
"sort"
9+
"slices"
1010
)
1111

1212
// WalkNodeFunc is the type of the function called for each node visited
@@ -34,7 +34,7 @@ func walkNode(ctx context.Context, path []byte, l Loader, n *Node, walkFn WalkNo
3434
for k := range n.forks {
3535
keys = append(keys, k)
3636
}
37-
sort.Slice(keys, func(i, j int) bool { return keys[i] < keys[j] })
37+
slices.Sort(keys)
3838

3939
for _, k := range keys {
4040
v := n.forks[k]

0 commit comments

Comments
 (0)