Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
func Merge[K comparable, V any](items ...map[K]V) map[K]V
Merge takes a collection of maps and returns a single map, where by items are merged of all given sets. If any keys overlap, Then the last specified key takes precedence. Example:
data := collections.Merge(map[string]string{"foo": "bar1", "baz": "bar1"}, map[string]string{"foo": "bar2"}) // returns: map[string]string{"foo": "bar2", "empty": "bar1"}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.