Documentation
¶
Overview ¶
Package fmap is a utility for flattening maps into slices of key-value pairs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlattenedKVs ¶
FlattenedKVs can be used to convert a map into a sorted slice of key-value pairs
func New ¶
func New[K, V cmp.Ordered](m map[K]V) FlattenedKVs[K, V]
New returns a sorted slice of key-value pairs from a map
func (FlattenedKVs[K, V]) CmpK ¶
func (FlattenedKVs[K, V]) CmpK(desc bool) func(a, b flatKV[K, V]) int
CmpK returns the sort function for the keys
func (FlattenedKVs[K, V]) CmpV ¶
func (FlattenedKVs[K, V]) CmpV(desc bool) func(a, b flatKV[K, V]) int
CmpV returns the sort function for the values
Click to show internal directories.
Click to hide internal directories.