Documentation
¶
Index ¶
- func Each[K comparable, V any](m map[K]V, fn func(K, V))
- func EachErr[K comparable, V any](m map[K]V, fn func(K, V) error) error
- func Has[K comparable, V any](m map[K]V, k K) bool
- func Keys[K comparable, V any](m map[K]V) []K
- func KeysFiltered[K comparable, V any](m map[K]V, fn func(K) bool) []K
- func Values[K comparable, V any](m map[K]V) []V
- func ValuesFiltered[K comparable, V any](m map[K]V, fn func(V) bool) []V
- type Item
- type Mapper
- func (t Mapper[K, V]) Each(fn func(K, V))
- func (t Mapper[K, V]) EachErr(fn func(K, V) error) error
- func (t Mapper[K, V]) Has(k K) bool
- func (t Mapper[K, V]) Items() []Item[K, V]
- func (t Mapper[K, V]) Keys() []K
- func (t Mapper[K, V]) KeysFiltered(fn func(K) bool) []K
- func (t Mapper[K, V]) Values() []V
- func (t Mapper[K, V]) ValuesFiltered(fn func(V) bool) []V
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 Has ¶
func Has[K comparable, V any](m map[K]V, k K) bool
func Keys ¶
func Keys[K comparable, V any](m map[K]V) []K
func KeysFiltered ¶
func KeysFiltered[K comparable, V any](m map[K]V, fn func(K) bool) []K
func Values ¶
func Values[K comparable, V any](m map[K]V) []V
func ValuesFiltered ¶
func ValuesFiltered[K comparable, V any](m map[K]V, fn func(V) bool) []V
Types ¶
type Item ¶
type Item[K comparable, V any] struct { K K V V }
func Items ¶
func Items[K comparable, V any](m map[K]V) []Item[K, V]
func ItemsFiltered ¶
func ItemsFiltered[K comparable, V any](m map[K]V, fn func(K, V) bool) []Item[K, V]
type Mapper ¶
type Mapper[K comparable, V any] map[K]V
func (Mapper[K, V]) KeysFiltered ¶
func (Mapper[K, V]) ValuesFiltered ¶
Click to show internal directories.
Click to hide internal directories.