maps

package
v2.21.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

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

Copy creates a copy of the given map and returns it.

func Equal

func Equal[K comparable, V comparable](a, b map[K]V) bool

Equal returns true if the two maps contain the exact same set of associations.

func Merge

func Merge[K comparable, V any](dst, src map[K]V)

Merge merges map src into dst, giving the entries in src higher priority.

func ToSortedSlice

func ToSortedSlice[K constraints.Ordered, V any](m map[K]V) []V

ToSortedSlice returns a slice of the values in the given map, sorted by that map's keys.

Types

This section is empty.

Jump to

Keyboard shortcuts

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