Documentation
¶
Index ¶
- Constants
- func AddClone[E any, EPtr interface{ ... }](c interfaces.Adder[EPtr]) interfaces.FuncIter[EPtr]
- func AddClonePool[E any, EPtr interfaces.Ptr[E]](s interfaces.AdderPtr[E, EPtr], p interfaces.Pool[E, EPtr], ...) (err error)
- func AddOrReplaceIfGreater[T interface{ ... }](c interfaces.MutableSetLike[T], b T) (shouldAdd bool, err error)
- func AddString[E any, EPtr interfaces.SetterPtr[E]](c interfaces.Adder[E], v string) (err error)
- func Chain[T any](e T, wfs ...interfaces.FuncIter[T]) (err error)
- func DerivedValues[E any, F any](c interfaces.SetLike[E], f interfaces.FuncTransform[E, F]) (out []F, err error)
- func Elements[T any](s interfaces.Collection[T]) (out []T)
- func ElementsSorted[T any](s interfaces.Collection[T], sf func(T, T) bool) (out []T)
- func ErrorWaitGroupApply[T any](wg errors.WaitGroup, s interfaces.Collection[T], f interfaces.FuncIter[T]) bool
- func Len(cs ...interfaces.Lenner) (n int)
- func MakeChain[T any](wfs ...interfaces.FuncIter[T]) interfaces.FuncIter[T]
- func MakeChainDebug[T any](wfs ...interfaces.FuncIter[T]) interfaces.FuncIter[T]
- func MakeFuncSetString[E any, EPtr interfaces.SetterPtr[E]](c interfaces.Adder[E]) interfaces.FuncSetString
- func MakeIterDebug[T any](f interfaces.FuncIter[T]) interfaces.FuncIter[T]
- func MakeSyncSerializer[T any](wf interfaces.FuncIter[T]) interfaces.FuncIter[T]
- func Multiplex[T any](e interfaces.FuncIter[T], producers ...func(interfaces.FuncIter[T]) error) (err error)
- func PrintPointer[T any, TPtr interfaces.Ptr[T]](e TPtr) (err error)
- func ResetMap[K comparable, V any](m map[K]V)
- func ResetMutableSetWithPool[E any, EPtr interfaces.Ptr[E]](s interfaces.MutableSetPtrLike[E, EPtr], p interfaces.Pool[E, EPtr])
- func ReverseSortable(s sort.Interface)
- func SetEquals[T any](a, b interfaces.SetLike[T]) bool
- func SetEqualsPtr[T any, TPtr interfaces.Ptr[T]](a, b interfaces.SetPtrLike[T, TPtr]) bool
- func SortedStrings[E interfaces.Stringer](cs ...interfaces.Collection[E]) (out []string)
- func SortedValues[E interfaces.Value[E]](c interfaces.SetLike[E]) (out []E)
- func SortedValuesBy[E any](c interfaces.SetLike[E], sf func(E, E) bool) (out []E)
- func StringCommaSeparated[E interfaces.Stringer](cs ...interfaces.Collection[E]) string
- func StringDelimiterSeparated[E interfaces.Stringer](d string, cs ...interfaces.Collection[E]) string
- func Strings[E interfaces.Stringer](cs ...interfaces.Collection[E]) (out []string)
- type AsyncSerializer
- type AtLeastOnce
- type Slice
- type SortCompare
- type StringerKeyer
- type StringerKeyerPtr
Constants ¶
View Source
const ( SortCompareLess = sortCompare(iota) SortCompareEqual SortCompareGreater )
Variables ¶
This section is empty.
Functions ¶
func AddClone ¶
func AddClone[E any, EPtr interface { *E ResetWithPtr(*E) }]( c interfaces.Adder[EPtr], ) interfaces.FuncIter[EPtr]
func AddClonePool ¶
func AddClonePool[E any, EPtr interfaces.Ptr[E]]( s interfaces.AdderPtr[E, EPtr], p interfaces.Pool[E, EPtr], r interfaces.Resetter2[E, EPtr], b EPtr, ) (err error)
func AddOrReplaceIfGreater ¶
func AddOrReplaceIfGreater[T interface {
interfaces.Stringer
interfaces.ValueLike
interfaces.Lessor[T]
}](
c interfaces.MutableSetLike[T],
b T,
) (shouldAdd bool, err error)
func AddString ¶
func AddString[E any, EPtr interfaces.SetterPtr[E]]( c interfaces.Adder[E], v string, ) (err error)
func DerivedValues ¶
func DerivedValues[E any, F any]( c interfaces.SetLike[E], f interfaces.FuncTransform[E, F], ) (out []F, err error)
func Elements ¶
func Elements[T any](s interfaces.Collection[T]) (out []T)
func ElementsSorted ¶
func ElementsSorted[T any]( s interfaces.Collection[T], sf func(T, T) bool, ) (out []T)
func ErrorWaitGroupApply ¶
func ErrorWaitGroupApply[T any]( wg errors.WaitGroup, s interfaces.Collection[T], f interfaces.FuncIter[T], ) bool
func Len ¶
func Len(cs ...interfaces.Lenner) (n int)
func MakeChain ¶
func MakeChain[T any](wfs ...interfaces.FuncIter[T]) interfaces.FuncIter[T]
func MakeChainDebug ¶
func MakeChainDebug[T any](wfs ...interfaces.FuncIter[T]) interfaces.FuncIter[T]
func MakeFuncSetString ¶
func MakeFuncSetString[ E any, EPtr interfaces.SetterPtr[E], ]( c interfaces.Adder[E], ) interfaces.FuncSetString
func MakeIterDebug ¶
func MakeIterDebug[T any](f interfaces.FuncIter[T]) interfaces.FuncIter[T]
func MakeSyncSerializer ¶
func MakeSyncSerializer[T any]( wf interfaces.FuncIter[T], ) interfaces.FuncIter[T]
func Multiplex ¶
func Multiplex[T any]( e interfaces.FuncIter[T], producers ...func(interfaces.FuncIter[T]) error, ) (err error)
func PrintPointer ¶
func PrintPointer[T any, TPtr interfaces.Ptr[T]](e TPtr) (err error)
func ResetMap ¶
func ResetMap[K comparable, V any](m map[K]V)
func ResetMutableSetWithPool ¶
func ResetMutableSetWithPool[E any, EPtr interfaces.Ptr[E]]( s interfaces.MutableSetPtrLike[E, EPtr], p interfaces.Pool[E, EPtr], )
func ReverseSortable ¶
func SetEquals ¶
func SetEquals[T any]( a, b interfaces.SetLike[T], ) bool
TODO refactor to use iterators
func SetEqualsPtr ¶
func SetEqualsPtr[T any, TPtr interfaces.Ptr[T]]( a, b interfaces.SetPtrLike[T, TPtr], ) bool
func SortedStrings ¶
func SortedStrings[E interfaces.Stringer]( cs ...interfaces.Collection[E], ) (out []string)
func SortedValues ¶
func SortedValues[E interfaces.Value[E]]( c interfaces.SetLike[E], ) (out []E)
func SortedValuesBy ¶
func SortedValuesBy[E any]( c interfaces.SetLike[E], sf func(E, E) bool, ) (out []E)
func StringCommaSeparated ¶
func StringCommaSeparated[E interfaces.Stringer]( cs ...interfaces.Collection[E], ) string
func StringDelimiterSeparated ¶
func StringDelimiterSeparated[E interfaces.Stringer]( d string, cs ...interfaces.Collection[E], ) string
func Strings ¶
func Strings[E interfaces.Stringer]( cs ...interfaces.Collection[E], ) (out []string)
Types ¶
type AsyncSerializer ¶
type AsyncSerializer[T any] struct { // contains filtered or unexported fields }
func MakeAsyncSerializer ¶
func MakeAsyncSerializer[T any]( wf interfaces.FuncIter[T], ) AsyncSerializer[T]
func (AsyncSerializer[T]) Do ¶
func (s AsyncSerializer[T]) Do(e T) (err error)
func (AsyncSerializer[T]) Wait ¶
func (s AsyncSerializer[T]) Wait() (err error)
type AtLeastOnce ¶
type AtLeastOnce[T any] struct { // contains filtered or unexported fields }
func (*AtLeastOnce[T]) Do ¶
func (alo *AtLeastOnce[T]) Do(_ T) (err error)
func (*AtLeastOnce[T]) WasAtLeastOnce ¶
func (alo *AtLeastOnce[T]) WasAtLeastOnce() bool
type SortCompare ¶
type StringerKeyer ¶
type StringerKeyer[ T interfaces.Stringer, ] struct{}
func (StringerKeyer[T]) GetKey ¶
func (sk StringerKeyer[T]) GetKey(e T) string
func (StringerKeyer[T]) RegisterGob ¶
func (sk StringerKeyer[T]) RegisterGob() StringerKeyer[T]
type StringerKeyerPtr ¶
type StringerKeyerPtr[ T interfaces.Stringer, TPtr interface { interfaces.Ptr[T] interfaces.Stringer }, ] struct{}
func (StringerKeyerPtr[T, TPtr]) GetKey ¶
func (sk StringerKeyerPtr[T, TPtr]) GetKey(e T) string
func (StringerKeyerPtr[T, TPtr]) GetKeyPtr ¶
func (sk StringerKeyerPtr[T, TPtr]) GetKeyPtr(e TPtr) string
func (StringerKeyerPtr[T, TPtr]) RegisterGob ¶
func (sk StringerKeyerPtr[T, TPtr]) RegisterGob() StringerKeyerPtr[T, TPtr]
Click to show internal directories.
Click to hide internal directories.