Documentation
¶
Index ¶
- func Filter[K comparable, V any](m map[K]V, predicate predicates.PredicateFunc[Entry[K, V]]) map[K]V
- func FromEntries[K comparable, V any](entries []Entry[K, V]) map[K]V
- func Map[K comparable, K2 comparable, V any, V2 any](m map[K]V, mapFunc func(Entry[K, V]) Entry[K2, V2]) map[K2]V2
- func MapE[K comparable, K2 comparable, V any, V2 any](m map[K]V, mapFunc func(Entry[K, V]) (Entry[K2, V2], error)) (map[K2]V2, error)
- type Entry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶
func Filter[K comparable, V any](m map[K]V, predicate predicates.PredicateFunc[Entry[K, V]]) map[K]V
func FromEntries ¶
func FromEntries[K comparable, V any](entries []Entry[K, V]) map[K]V
func Map ¶
func Map[K comparable, K2 comparable, V any, V2 any](m map[K]V, mapFunc func(Entry[K, V]) Entry[K2, V2]) map[K2]V2
func MapE ¶
func MapE[K comparable, K2 comparable, V any, V2 any](m map[K]V, mapFunc func(Entry[K, V]) (Entry[K2, V2], error)) (map[K2]V2, error)
Types ¶
type Entry ¶
type Entry[K comparable, V any] struct { Key K Value V }
func ToSlice ¶
func ToSlice[K comparable, V any](m map[K]V) []Entry[K, V]
Click to show internal directories.
Click to hide internal directories.