Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶ added in v0.9.0
func Copy[T1 comparable, T2 any](m map[T1]T2) map[T1]T2
Copy returns a shallow copy of the given map.
func Keys ¶
func Keys[T1 comparable, T2 any](m map[T1]T2) []T1
Keys returns the slice of keys for the given map.
func Merge ¶ added in v0.10.2
func Merge[T1 comparable, T2 any](m1, m2 map[T1]T2) map[T1]T2
Merge returns a new map that contains all the elements of the given maps.
func SortKeys ¶ added in v0.9.0
func SortKeys[T1 comparable, T2 any](m map[T1]T2, sort func([]T1)) []T1
SortKeys returns the slice of keys for the given map, sorted using given sorting function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.