Skip to main content Link Search Menu Expand Document (external link)

Split

func (input *Channel[T]) Split(numOutputs int, opts ...options.SplitOption) []*Channel[T]

Split sends each input value to any of the output channels, with no specific priority.

Example

outputs := input.Split(2)