Documentation
¶
Index ¶
- Variables
- func AddOrReplaceIfGreater[ELEMENT interface{ ... }](set interfaces.SetMutable[ELEMENT], newElement ELEMENT, cmp cmp.Func[ELEMENT]) (shouldAdd bool, err error)
- func AddString[ELEMENT any, ELEMENT_PTR interfaces.SetterPtr[ELEMENT]](adder interfaces.Adder[ELEMENT], value string) (err error)
- func AppendSeq[ELEMENT any, APPENDER interface{ ... }](collection APPENDER, seq interfaces.Seq[ELEMENT])
- func AppendSeq2[INDEX any, ELEMENT any, APPENDER interface{ ... }](collection APPENDER, seq interfaces.Seq2[INDEX, ELEMENT])
- func Chain[T any](e T, wfs ...interfaces.FuncIter[T]) (err error)
- func CollectError[ELEMENT any](seq interfaces.SeqError[ELEMENT]) ([]ELEMENT, error)
- func CollectSlice[ELEMENT any](collection interfaces.Collection[ELEMENT]) (slice []ELEMENT)
- func DerivedValues[E any, F any](c interfaces.Set[E], f interfaces.FuncTransform[E, F]) (out []F, err error)
- 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 MakeFuncAddString[ELEMENT any, ELEMENT_PTR interfaces.SetterPtr[ELEMENT]](adder interfaces.Adder[ELEMENT]) interfaces.FuncSetString
- func MakeIterDebug[T any](f interfaces.FuncIter[T]) interfaces.FuncIter[T]
- func MakeSeqErrorEmpty[ELEMENT any]() interfaces.SeqError[ELEMENT]
- func MakeSeqErrorFromSeq[ELEMENT any](iter interfaces.Seq[ELEMENT]) interfaces.SeqError[ELEMENT]
- func MakeSeqErrorWithError[ELEMENT any](err error) interfaces.SeqError[ELEMENT]
- func MakeSyncSerializer[ELEMENT any](funk interfaces.FuncIter[ELEMENT]) interfaces.FuncIter[ELEMENT]
- func MergeSeqErrorLeft[ELEMENT any, ELEMENT_PTR interfaces.Ptr[ELEMENT]](seqLeft, seqRight interfaces.SeqError[ELEMENT_PTR], ...) interfaces.SeqError[ELEMENT_PTR]
- func MergeStreamPreferringLeft[ELEMENT any, ELEMENT_PTR interfaces.Ptr[ELEMENT]](pullLeft, pullRight interfaces.Pull2[ELEMENT_PTR, error], ...) interfaces.SeqError[ELEMENT_PTR]
- 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 Pull[ELEMENT any](seq interfaces.Seq[ELEMENT]) (func() (ELEMENT, bool), func())
- func Pull2[ELEMENT_ONE any, ELEMENT_TWO any](seq interfaces.Seq2[ELEMENT_ONE, ELEMENT_TWO]) (func() (ELEMENT_ONE, ELEMENT_TWO, bool), func())
- func PullError[ELEMENT any](seq interfaces.SeqError[ELEMENT]) (func() (ELEMENT, error, bool), func())
- func PullErrorWithoutOk[ELEMENT any, ELEMENT_PTR interfaces.Ptr[ELEMENT]](seq interfaces.SeqError[ELEMENT_PTR]) (func() (ELEMENT_PTR, error), func())
- func ReverseSortable(sortable sort.Interface)
- func SortedStrings[ELEMENT interfaces.Stringer](collections ...interfaces.Collection[ELEMENT]) (out []string)
- func SortedValues[ELEMENT interfaces.Value](seq interfaces.Seq[ELEMENT]) []ELEMENTdeprecated
- func SortedValuesBy[ELEMENT any](set interfaces.Collection[ELEMENT], cmp cmp.Func[ELEMENT]) []ELEMENTdeprecated
- func StringCommaSeparated[ELEMENT interfaces.Stringer](collections ...interfaces.Collection[ELEMENT]) string
- func StringDelimiterSeparated[ELEMENT interfaces.Stringer](delimiter string, collections ...interfaces.Collection[ELEMENT]) string
- func Strings[ELEMENT interfaces.Stringer](collections interfaces.Seq[interfaces.Collection[ELEMENT]]) interfaces.Seq[string]
- type AsyncSerializer
- type AtLeastOnce
- type StringerKeyer
- type StringerKeyerPtr
Constants ¶
This section is empty.
Variables ¶
View Source
var StringKeyer stringKeyer
Functions ¶
func AddOrReplaceIfGreater ¶
func AddOrReplaceIfGreater[
ELEMENT interface {
interfaces.Stringer
},
](
set interfaces.SetMutable[ELEMENT],
newElement ELEMENT,
cmp cmp.Func[ELEMENT],
) (shouldAdd bool, err error)
func AddString ¶
func AddString[ELEMENT any, ELEMENT_PTR interfaces.SetterPtr[ELEMENT]]( adder interfaces.Adder[ELEMENT], value string, ) (err error)
Constructs an object of type `ELEMENT` by using its `Set` method and adds it to the given `adder`
func AppendSeq ¶
func AppendSeq[ELEMENT any, APPENDER interface{ Append(...ELEMENT) }]( collection APPENDER, seq interfaces.Seq[ELEMENT], )
func AppendSeq2 ¶
func AppendSeq2[INDEX any, ELEMENT any, APPENDER interface{ Append(...ELEMENT) }]( collection APPENDER, seq interfaces.Seq2[INDEX, ELEMENT], )
func CollectError ¶
func CollectError[ELEMENT any]( seq interfaces.SeqError[ELEMENT], ) ([]ELEMENT, error)
func CollectSlice ¶
func CollectSlice[ELEMENT any]( collection interfaces.Collection[ELEMENT], ) (slice []ELEMENT)
func DerivedValues ¶
func DerivedValues[E any, F any]( c interfaces.Set[E], f interfaces.FuncTransform[E, F], ) (out []F, err error)
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 MakeFuncAddString ¶
func MakeFuncAddString[ ELEMENT any, ELEMENT_PTR interfaces.SetterPtr[ELEMENT], ]( adder interfaces.Adder[ELEMENT], ) interfaces.FuncSetString
returns a function that executes `AddString` for the given `adder`
func MakeIterDebug ¶
func MakeIterDebug[T any](f interfaces.FuncIter[T]) interfaces.FuncIter[T]
func MakeSeqErrorEmpty ¶
func MakeSeqErrorEmpty[ELEMENT any]() interfaces.SeqError[ELEMENT]
func MakeSeqErrorFromSeq ¶
func MakeSeqErrorFromSeq[ELEMENT any]( iter interfaces.Seq[ELEMENT], ) interfaces.SeqError[ELEMENT]
func MakeSeqErrorWithError ¶
func MakeSeqErrorWithError[ELEMENT any]( err error, ) interfaces.SeqError[ELEMENT]
func MakeSyncSerializer ¶
func MakeSyncSerializer[ELEMENT any]( funk interfaces.FuncIter[ELEMENT], ) interfaces.FuncIter[ELEMENT]
func MergeSeqErrorLeft ¶
func MergeSeqErrorLeft[ ELEMENT any, ELEMENT_PTR interfaces.Ptr[ELEMENT], ]( seqLeft, seqRight interfaces.SeqError[ELEMENT_PTR], funcCmp func(ELEMENT_PTR, ELEMENT_PTR) cmp.Result, ) interfaces.SeqError[ELEMENT_PTR]
merges the two sorted sequences into a single output sequence. when `funcCmp` yields cmp.Equal for two elements, the left element is yielded to the output sequence.
func MergeStreamPreferringLeft ¶
func MergeStreamPreferringLeft[ ELEMENT any, ELEMENT_PTR interfaces.Ptr[ELEMENT], ]( pullLeft, pullRight interfaces.Pull2[ELEMENT_PTR, error], funcCmp func(ELEMENT_PTR, ELEMENT_PTR) cmp.Result, ) interfaces.SeqError[ELEMENT_PTR]
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 Pull2 ¶
func Pull2[ELEMENT_ONE any, ELEMENT_TWO any]( seq interfaces.Seq2[ELEMENT_ONE, ELEMENT_TWO], ) (func() (ELEMENT_ONE, ELEMENT_TWO, bool), func())
func PullError ¶
func PullError[ELEMENT any]( seq interfaces.SeqError[ELEMENT], ) (func() (ELEMENT, error, bool), func())
func PullErrorWithoutOk ¶
func PullErrorWithoutOk[ELEMENT any, ELEMENT_PTR interfaces.Ptr[ELEMENT]]( seq interfaces.SeqError[ELEMENT_PTR], ) (func() (ELEMENT_PTR, error), func())
func ReverseSortable ¶
func SortedStrings ¶
func SortedStrings[ELEMENT interfaces.Stringer]( collections ...interfaces.Collection[ELEMENT], ) (out []string)
func SortedValues
deprecated
func SortedValues[ELEMENT interfaces.Value]( seq interfaces.Seq[ELEMENT], ) []ELEMENT
Deprecated: use collections_slice.SortedValues
func SortedValuesBy
deprecated
func SortedValuesBy[ELEMENT any]( set interfaces.Collection[ELEMENT], cmp cmp.Func[ELEMENT], ) []ELEMENT
Deprecated: use collections_slice.SortedValuesBy
func StringCommaSeparated ¶
func StringCommaSeparated[ELEMENT interfaces.Stringer]( collections ...interfaces.Collection[ELEMENT], ) string
func StringDelimiterSeparated ¶
func StringDelimiterSeparated[ELEMENT interfaces.Stringer]( delimiter string, collections ...interfaces.Collection[ELEMENT], ) string
func Strings ¶
func Strings[ELEMENT interfaces.Stringer]( collections interfaces.Seq[interfaces.Collection[ELEMENT]], ) interfaces.Seq[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 StringerKeyer ¶
type StringerKeyer[ T interfaces.Stringer, ] struct{}
func (StringerKeyer[T]) GetKey ¶
func (sk StringerKeyer[T]) GetKey(e T) string
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
Click to show internal directories.
Click to hide internal directories.