Documentation ¶
Index ¶
- func DeepCopy[M ~map[K]V, K comparable, V deepcopy.DeepCopier[V]](m M) M
- func Map[M ~map[KA]VA, KA comparable, VA any, KB comparable, VB any](m M, keyFunc func(KA) KB, valueFunc func(VA) VB) map[KB]VB
- func MapKeys[M ~map[KA]V, KA comparable, KB comparable, V any](m M, keyFunc func(KA) KB) map[KB]V
- func MapValues[M ~map[K]VA, K comparable, VA any, VB any](m M, valueFunc func(VA) VB) map[K]VB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepCopy ¶
func DeepCopy[M ~map[K]V, K comparable, V deepcopy.DeepCopier[V]](m M) M
DeepCopy returns a deep copy of M.
func Map ¶
func Map[M ~map[KA]VA, KA comparable, VA any, KB comparable, VB any](m M, keyFunc func(KA) KB, valueFunc func(VA) VB) map[KB]VB
Map maps the keys and values of m into keyFunc(k) and valueFunc(v), respectively. Duplicate keys are overwritten.
func MapKeys ¶
func MapKeys[M ~map[KA]V, KA comparable, KB comparable, V any](m M, keyFunc func(KA) KB) map[KB]V
MapKeys maps the keys of m into keyFunc(k). Duplicate keys are overwritten.
func MapValues ¶
func MapValues[M ~map[K]VA, K comparable, VA any, VB any](m M, valueFunc func(VA) VB) map[K]VB
MapValues maps the values of m into valueFunc(v).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.