Documentation
¶
Index ¶
- func All[I any, L ~[]I](items L, f func(I) bool) bool
- func AllE[I any, L ~[]I](items L, f func(I) (bool, error)) (bool, error)
- func Any[I any, L ~[]I](items L, f func(I) bool) bool
- func AnyE[I any, L ~[]I](items L, f func(I) (bool, error)) (bool, error)
- func ArrayIntersection[I comparable, L ~[]I](slices ...L) L
- func Contains[I comparable, L ~[]I](item I, items L) bool
- func Filter[I any, L ~[]I](items L, f func(I) bool) []I
- func FilterE[I any, L ~[]I](items L, f func(I) (bool, error)) ([]I, error)
- func Find[I any, L ~[]I](items L, f func(I) bool) (i I, ok bool)
- func FindE[I any, L ~[]I](items L, f func(I) (bool, error)) (i I, ok bool, err error)
- func GroupBy[I any, L ~[]I, K comparable](items L, f func(I) K) map[K]L
- func GroupByE[I any, L ~[]I, K comparable](items L, f func(I) (K, error)) (map[K]L, error)
- func Intersection[I comparable, L ~[]I](items1 L, items2 L) map[I]struct{}
- func Map[I any, L ~[]I, K comparable](items L, f func(I) K) map[K]I
- func MapE[I any, L ~[]I, K comparable](items L, f func(I) (K, error)) (map[K]I, error)
- func MapKeys[K comparable, V any](items map[K]V) []K
- func MapS[I any, L ~[]I, K comparable](items L, f func(I) K) []struct{ ... }
- func MapSE[I any, L ~[]I, K comparable](items L, f func(I) (K, error)) ([]struct{ ... }, error)
- func MapValues[K comparable, V any](items map[K]V) []V
- func MapsIsEqual[K comparable, V comparable](a, b map[K]V) bool
- func NullUUIDToP(id uuid.NullUUID) *uuid.UUID
- func P[T any](v T) *T
- func PToNullUUID(id *uuid.UUID) uuid.NullUUID
- func Reduce[I any, L ~[]I, R any](items L, f func(R, I) R, initial R) R
- func ReduceE[I any, L ~[]I, R any](items L, f func(R, I) (R, error), initial R) (R, error)
- func Select[I any, L ~[]I, T any](items L, f func(I) T) []T
- func SelectE[I any, L ~[]I, T any](items L, f func(I) (T, error)) ([]T, error)
- func Set[I any, L ~[]I, K comparable](items L, f func(I) K) map[K]struct{}
- func SetE[I any, L ~[]I, K comparable](items L, f func(I) (K, error)) (map[K]struct{}, error)
- func T[T any](value bool, trueValue T, falseValue T) T
- func TF[T any](value bool, trueValue func() T, falseValue func() T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayIntersection ¶ added in v1.3.0
func ArrayIntersection[I comparable, L ~[]I](slices ...L) L
func Contains ¶
func Contains[I comparable, L ~[]I](item I, items L) bool
func GroupBy ¶
func GroupBy[I any, L ~[]I, K comparable](items L, f func(I) K) map[K]L
func GroupByE ¶
func GroupByE[I any, L ~[]I, K comparable](items L, f func(I) (K, error)) (map[K]L, error)
func Intersection ¶
func Intersection[I comparable, L ~[]I](items1 L, items2 L) map[I]struct{}
func Map ¶
func Map[I any, L ~[]I, K comparable](items L, f func(I) K) map[K]I
func MapKeys ¶ added in v1.5.0
func MapKeys[K comparable, V any](items map[K]V) []K
func MapS ¶
func MapS[I any, L ~[]I, K comparable](items L, f func(I) K) []struct { K K I I }
func MapSE ¶
func MapSE[I any, L ~[]I, K comparable](items L, f func(I) (K, error)) ([]struct { K K I I }, error)
func MapValues ¶ added in v1.5.0
func MapValues[K comparable, V any](items map[K]V) []V
func MapsIsEqual ¶
func MapsIsEqual[K comparable, V comparable](a, b map[K]V) bool
func Set ¶ added in v1.5.0
func Set[I any, L ~[]I, K comparable](items L, f func(I) K) map[K]struct{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.