mapper

package
v1.0.31 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Each

func Each[K comparable, V any](m map[K]V, fn func(K, V))

func EachErr

func EachErr[K comparable, V any](m map[K]V, fn func(K, V) error) error

func Get

func Get[K comparable, V any](m map[K]V, k K) optioner.Option[V]

func Has

func Has[K comparable, V any](m map[K]V, k K) bool

func Items

func Items[K comparable, V any](m map[K]V) optioner.Option[[]Item[K, V]]

func ItemsFiltered

func ItemsFiltered[K comparable, V any](m map[K]V, fn func(K, V) bool) optioner.Option[[]Item[K, V]]

func Keys

func Keys[K comparable, V any](m map[K]V) optioner.Option[[]K]

func KeysFiltered

func KeysFiltered[K comparable, V any](m map[K]V, fn func(K) bool) optioner.Option[[]K]

func Values

func Values[K comparable, V any](m map[K]V) optioner.Option[[]V]

func ValuesFiltered

func ValuesFiltered[K comparable, V any](m map[K]V, fn func(V) bool) optioner.Option[[]V]

Types

type Item

type Item[K comparable, V any] mapper.Item[K, V]

type Mapper

type Mapper[K comparable, V any] mapper.Mapper[K, V]

func New

func New[K comparable, V any]() Mapper[K, V]

Jump to

Keyboard shortcuts

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