Documentation ¶
Overview ¶
Package collect provides util functions and types to implement the Collect method of a c.Transformable implementation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Groups ¶
func Groups[K comparable, V any](it c.KVIterator[K, V]) map[K][]V
Groups collects sets of values grouped by keys obtained by passing a key/value iterator.
func Map ¶
func Map[K comparable, V any](it c.KVIterator[K, V]) map[K]V
Map instantiates a map with the key/values obtained by passing over a key/value iterator.
Types ¶
type Collector ¶
Collector is Converter of Iterator that collects all values to any slice or map, mostly used to extract slice fields to flatting a result.
type CollectorKV ¶
type CollectorKV[k, v any, out any] func(c.KVIterator[k, v]) out
CollectorKV is Converter of key/value Iterator that collects all values to any slice or map, mostly used to extract slice fields to flatting a result.
Click to show internal directories.
Click to hide internal directories.