Versions in this module Expand all Collapse all v1 v1.1.1 Sep 22, 2025 v1.1.0 Aug 26, 2025 Changes in this version + const AbsoluteMaxConcurrency + const DefaultMaxConcurrency + var ConcurrencyLimitOption = func(limit int) Option + var DiscardResultIfErrOption = func() Option + var RandomOrderOption = func() Option + var RateLimitOption = func(rate int, rateTimeframe time.Duration) Option + var RetryOption = func(numRetries int, backoffInterval time.Duration) Option + func Batch[T any](items []T, batchSize int) [][]T + func ContainsAll[T comparable](list1, list2 []T) bool + func ContainsAny[T comparable](A []T, B []T) bool + func ContainsDeepEqual[T any](list []T, item T) bool + func Contains[T comparable](list []T, item T) bool + func Convert[T any, Y any](from T, converter func(T) Y) Y + func Copy[K comparable, V any](items map[K]V) map[K]V + func DedupeByHash[T any](items []T, hashFn datastructures.HashFn[T]) []T + func Dedupe[T comparable](items []T) []T + func EachMergeErrs[T any](items []T, fn func(T) error) error + func Each[T any](items []T, fn func(T)) + func EqualIgnoreOrder[T comparable](slices ...[]T) bool + func FilterMap[K comparable, V any](from map[K]V, filter func(k K, v V) bool) map[K]V + func Filter[T any](from []T, filter func(T) bool) []T + func Find[T interface{}](from []T, filter func(T) bool) (item T, wasFound bool) + func Generalize[T any](from []T) []any + func GoEachMapWithErrs[K comparable, V any](items map[K]V, fn func(K, V) error, opts ...Option) (errs []error) + func GoEachWithErrs[T any](items []T, fn func(T) error, opts ...Option) (errs []error) + func GoEach[T any](items []T, fn func(T), opts ...Option) + func GoMapToManyWithErrs[T any, Y any](items []T, converter func(T) ([]Y, error), opts ...Option) (results []Y, errs []error) + func GoMapToMany[T any, Y any](items []T, converter func(T) []Y, opts ...Option) (results []Y) + func GoMapToSliceWithErrs[K comparable, V any, Z any](items map[K]V, converter func(K, V) (Z, error), opts ...Option) (results []Z, errs []error) + func GoMapToSlice[K comparable, V any, Z any](items map[K]V, converter func(K, V) Z, opts ...Option) []Z + func GoMapWithErrs[T any, Y any](items []T, f func(T) (Y, error), opts ...Option) (results []Y, errs []error) + func GoMap[T any, Y any](items []T, converter func(T) Y, opts ...Option) []Y + func GoToMapWithErrs[T any, K comparable, V any](items []T, f func(T) (K, V, error), opts ...Option) (results map[K]V, errs []error) + func GoToMap[T any, K comparable, V any](items []T, f func(T) (K, V), opts ...Option) map[K]V + func HasNonNilError(errs []error) bool + func Intersection[T comparable](a, b []T) []T + func Join[T any](items []T, separator string) string + func MapMergeErrs[T any, Y any](from []T, converter func(T) (Y, error)) ([]Y, error) + func MapToSlice[K comparable, V any, Z any](from map[K]V, converter func(k K, v V) Z) []Z + func MapWithErrs[T any, Y any](from []T, converter func(T) (Y, error)) ([]Y, []error) + func Map[T any, Y any](from []T, converter func(T) Y) []Y + func Max[T cmp.Ordered](values ...T) T + func MergeErrors(errs ...error) error + func Min[T cmp.Ordered](values ...T) T + func Reduce[T any, Y any](from []T, to Y, reducer func(T, Y) Y) Y + func RemoveNils[T any](from []T) []T + func Remove[T any](slice []T, i int) []T + func RunWithRetries[T any](fn func(t T) error, item T, numRetries int, backoffInterval time.Duration) error + func Shuffle[T any](items []T) []T + func ToMap[T any, K comparable, V any](from []T, converter func(T) (K, V)) map[K]V + func WrapError(err error, message string) error + func WrapErrorf(err error, message string, args ...any) error + func WrapErrorsIntoFirst(errs ...error) error + type Option func(option *OptionConfig) *OptionConfig + type OptionConfig struct + ConcurrencyLimit int + DiscardResultsIfErr bool + RandomOrder bool + RetryBackoffInterval time.Duration + RetryCount int Other modules containing this package github.com/zendesk/go-generics/functions