Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for mapKeysSorted (0.09 sec)

  1. 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 res
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 33K bytes
    - Viewed (0)
Back to top