Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoValues = fmt.Errorf("no values")
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[E comparable] map[E]any
type WithSources ¶
type WithSources[Value comparable, Source ~string] map[Value][]Source
Collects different values with their sources
func (*WithSources[V, S]) Collect ¶
func (vs *WithSources[V, S]) Collect(value V, source S)
func (WithSources[Value, Source]) Combine ¶
func (vs WithSources[Value, Source]) Combine() []Value
func (WithSources[V, S]) One ¶
func (vs WithSources[V, S]) One() (V, error)
Returns "the value" if there is only one. Or returns an error which lists all contradicting values with sources
Click to show internal directories.
Click to hide internal directories.