Documentation
¶
Overview ¶
Package maps contains generic functions for maps
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Keys ¶ added in v1.0.0
func Keys[K comparable, V any](m map[K]V) []K
Keys returns a slice of all the keys in a map
func MapValues ¶
func MapValues[K comparable, X, Y any](m map[K]X, f func(X) Y) map[K]Y
MapValues transforms the values of the map using the given function
func ToSlice ¶
func ToSlice[K comparable, V, T any](m map[K]V, f func(K, V) T) []T
ToSlice converts a map to a slice using a given function
func Values ¶
func Values[K comparable, V any](m map[K]V) []V
Values returns a slice of all the values in a map
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.