Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InvertMap ¶
func InvertMap[K comparable, V comparable](m map[K]V) map[V]K
InvertMap inverts a map, swapping keys and values. Assumes unique values.
func MergeMaps ¶
func MergeMaps[K comparable, V any](map1, map2 map[K]V) map[K]V
MergeMaps merges two maps. If duplicate keys exist, the second map's value overwrites the first.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.