Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromEntries ¶ added in v0.2.6
func FromEntries[K comparable, V any](src []Entry[K, V]) map[K]V
FromEntries creates a map from a slice of key/value tuples.
func Keys ¶
func Keys[K comparable, V any](src map[K]V) []K
Keys returns an unsorted slice of map keys.
func SortedKeys ¶
SortedKeys returns a sorted slice of map keys.
func SortedValues ¶
func SortedValues[K comparable, V cmp.Ordered](src map[K]V) []V
SortedValues returns a sorted slice of map values.
func Values ¶
func Values[K comparable, V any](src map[K]V) []V
Values returns an unsorted slice of map values.
Types ¶
type Entry ¶ added in v0.2.6
type Entry[K comparable, V any] struct { Key K Val V }
Entry is a key/value tuple representing a map entry.
func Entries ¶ added in v0.2.6
func Entries[K comparable, V any](src map[K]V) []Entry[K, V]
Entries returns an unsorted slice of map entries.
Click to show internal directories.
Click to hide internal directories.