Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortKeys ¶
func SortKeys[K constraints.Ordered, V any](m map[K]V) []K
SortKeys sorts the keys of a map.
Types ¶
type KeyVal ¶
type KeyVal[K constraints.Ordered, V any] struct { Key K Val V }
KeyVal is a Key Value pair.
type KeyVals ¶
type KeyVals[K constraints.Ordered, V any] []KeyVal[K, V]
func SortByKeys ¶
func SortByKeys[K constraints.Ordered, V any](m map[K]V) KeyVals[K, V]
Sort sorts a map by key, returning a slice of KV structs.
Click to show internal directories.
Click to hide internal directories.