Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicGrouper ¶
type BasicGrouper[T any, K comparable] struct { GroupingFunc func(input T) K }
BasicGrouper implements Grouper
func NewBasicGrouper ¶
func NewBasicGrouper[T any, K comparable](groupingFunction func(input T) K) *BasicGrouper[T, K]
func (*BasicGrouper[T, K]) Group ¶
func (b *BasicGrouper[T, K]) Group(input []T) map[K][]T
type Grouper ¶
type Grouper[T any, K comparable] interface { Group(input []T) map[K][]T }
Grouper is a base type to split the source group into named list of results.
Click to show internal directories.
Click to hide internal directories.