Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoArgsSet = errors.New("args not set") ErrCombinationsNotSolved = errors.New("combinations not yet solved") )
Specify which errors this package can return
Functions ¶
This section is empty.
Types ¶
type Stream ¶
Stream is a representation of all possible combinations its args. That uses the Next() function to get each combination. WithSolveAhead() ensures combinations are generated all at once using. If not, it will solve iterativey with nextIterativeCombination()
func NewStream ¶
func NewStream(options ...StreamOption) Stream
NewStream creates a new stream and accepts stream options for it
type StreamOption ¶
type StreamOption func(*stream)
func WithArgs ¶
func WithArgs(args map[string][]string) StreamOption
WithArgs specifies which args to utilize in the new stream
func WithSolveAhead ¶
func WithSolveAhead(boolVar ...bool) StreamOption
WithSolveAhead specifies whether to solve before calling Next or All, only occurs on the first call to Next or All. By using this, the Stream will solve all possible combinations of its args which could take a lot of computation given a large enough input.