maps

package
v1.32.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy[K comparable, V any](m map[K]V) map[K]V

Copy makes a shallow copy of a map

func Merge added in v1.32.0

func Merge[K comparable, V any](d map[K]V, s ...map[K]V)

Merge merges the contents of several maps together into the first provided map. Each successive instance of a key found in any map overwrites a previously encountered instance. Provide the maps in inverse order of priority.

func Merged added in v1.32.0

func Merged[K comparable, V any](s ...map[K]V) map[K]V

Merged has the same behavior as Merge(), except that the maps are merged into a newly allocated map, not one of the parameters.

If no maps are provided as input, nil is returned, not an empty map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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