package mapext
import "github.com/go-playground/pkg/v5/map"
Index ¶
- func Map[K comparable, V any, U any](m map[K]V, init U, fn func(accum U, key K, value V) U) U
- func Retain[K comparable, V any](m map[K]V, fn func(key K, value V) bool)
Functions ¶
func Map ¶
func Map[K comparable, V any, U any](m map[K]V, init U, fn func(accum U, key K, value V) U) U
Map allows mapping of a map[K]V -> U.
func Retain ¶
func Retain[K comparable, V any](m map[K]V, fn func(key K, value V) bool)
Retain retains only the elements specified by the function and removes others.
Source Files ¶
- Version
- v5.24.0
- Published
- Jan 21, 2024
- Platform
- darwin/amd64
- Last checked
- 8 minutes ago –
Tools for package owners.