Documentation
¶
Index ¶
- func FromSlice[T any, K comparable, V any](ts []T, fn func(t T) (K, V)) map[K]V
- func FromSliceGroups[T any, K comparable](ts []T, fn func(t T) K) map[K][]T
- func FromSliceWithError[T any, K comparable, V any](ts []T, fn func(t T) (K, V, error)) (map[K]V, error)
- func Keys[K comparable, V any](m map[K]V) []K
- func MapValues[K comparable, V any, W any](m map[K]V, fn func(v V, k K) W) map[K]W
- func ToSlice[K comparable, V, T any](m map[K]V, fn func(k K, v V) T) []T
- func ToSliceWithError[K comparable, V, T any](m map[K]V, fn func(k K, v V) (T, error)) ([]T, error)
- func Values[K comparable, V any](m map[K]V) []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromSlice ¶
func FromSlice[T any, K comparable, V any](ts []T, fn func(t T) (K, V)) map[K]V
func FromSliceGroups ¶
func FromSliceGroups[T any, K comparable](ts []T, fn func(t T) K) map[K][]T
func FromSliceWithError ¶
func FromSliceWithError[T any, K comparable, V any](ts []T, fn func(t T) (K, V, error)) (map[K]V, error)
func Keys ¶
func Keys[K comparable, V any](m map[K]V) []K
func MapValues ¶
func MapValues[K comparable, V any, W any](m map[K]V, fn func(v V, k K) W) map[K]W
func ToSlice ¶
func ToSlice[K comparable, V, T any](m map[K]V, fn func(k K, v V) T) []T
func ToSliceWithError ¶
func ToSliceWithError[K comparable, V, T any](m map[K]V, fn func(k K, v V) (T, error)) ([]T, error)
func Values ¶
func Values[K comparable, V any](m map[K]V) []V
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.