map_utils

package
v0.6.80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 0 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL