Documentation ¶
Index ¶
- func Copy[K comparable, V any](m map[K]V) map[K]V
- 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 Filter[K comparable, V any](m map[K]V, fn func(K, V) bool) map[K]V
- func FilterErr[K comparable, V any](m map[K]V, fn func(K, V) (bool, error)) (map[K]V, 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 Map[K comparable, V any, R any](m map[K]V, fn func(k K, v V) R) []R
- func MapErr[K comparable, V any, R any](m map[K]V, fn func(k K, v V) (R, error)) ([]R, error)
- func MergeCopy[K comparable, V any](m1, m2 map[K]V) map[K]V
- func MergeInto[K comparable, V any](dst map[K]V, src map[K]V)
- func Reject[K comparable, V any](m map[K]V, fn func(K, V) bool) map[K]V
- func RejectErr[K comparable, V any](m map[K]V, fn func(K, V) (bool, error)) (map[K]V, error)
- 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 Copy ¶ added in v1.0.33
func Copy[K comparable, V any](m map[K]V) map[K]V
func Each ¶
func Each[K comparable, V any](m map[K]V, fn func(K, V))
func Filter ¶ added in v1.0.33
func Filter[K comparable, V any](m map[K]V, fn func(K, V) bool) map[K]V
func FilterErr ¶ added in v1.0.33
func FilterErr[K comparable, V any](m map[K]V, fn func(K, V) (bool, error)) (map[K]V, error)
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 Map ¶ added in v1.0.33
func Map[K comparable, V any, R any](m map[K]V, fn func(k K, v V) R) []R
func MapErr ¶ added in v1.0.33
func MapErr[K comparable, V any, R any](m map[K]V, fn func(k K, v V) (R, error)) ([]R, error)
func MergeCopy ¶ added in v1.0.33
func MergeCopy[K comparable, V any](m1, m2 map[K]V) map[K]V
func MergeInto ¶ added in v1.0.33
func MergeInto[K comparable, V any](dst map[K]V, src map[K]V)
func Reject ¶ added in v1.0.33
func Reject[K comparable, V any](m map[K]V, fn func(K, V) bool) map[K]V
func RejectErr ¶ added in v1.0.33
func RejectErr[K comparable, V any](m map[K]V, fn func(K, V) (bool, error)) (map[K]V, error)
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.