- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for mapKeysSorted (0.64 seconds)
-
cmd/utils.go
} type ordered interface { ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64 | string } // mapKeysSorted returns the map keys as a sorted slice. func mapKeysSorted[Map ~map[K]V, K ordered, V any](m Map) []K { res := make([]K, 0, len(m)) for k := range m { res = append(res, k) } slices.Sort(res) return resCreated: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 33K bytes - Click Count (0)