maps

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEach

func ForEach[M ~map[K]V, K comparable, V any](m M, handle func(K, V))

ForEach performs the operation.

func ForEachKey

func ForEachKey[M ~map[K]V, K comparable, V any](m M, handle func(v K))

ForEachKey performs the operation.

func ForEachValue

func ForEachValue[M ~map[K]V, K comparable, V any](m M, handle func(v V))

ForEachValue performs the operation.

func Keys

func Keys[M ~map[K]V, K comparable, V any](m M) []K

Keys returns the result.

func KeysMap

func KeysMap[M ~map[K]V, K comparable, V, T any](m M, transform func(K) T) []T

KeysMap returns the result.

func Map

func Map[M ~map[K]V, K comparable, V, T any](m M, subValue func(K, V) T) []T

Map returns the result.

func Merge

func Merge[M ~map[K]V, K comparable, V any](maps ...M) M

Merge returns the result.

func MultiKeys

func MultiKeys[M ~map[K]V, K comparable, V any](maps ...M) []K

MultiKeys returns the result.

func MultiValues

func MultiValues[M ~map[K]V, K comparable, V any](maps ...M) []V

MultiValues returns the result.

func Transform

func Transform[M1 ~map[K1]V1, K1 comparable, V1 any, M2 ~map[K2]V2, K2 comparable, V2 any](m M1, transform func(K1, V1) (K2, V2)) M2

Transform returns the result.

func Values

func Values[M ~map[K]V, K comparable, V any](m M) []V

Values returns the result.

func ValuesMap

func ValuesMap[M ~map[K]V, K comparable, V, T any](m M, transform func(V) T) []T

ValuesMap returns the result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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