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

FromSlice

func FromSlice[T any](pipeline *Pipeline, slice []T) *Channel[T]

FromSlice creates a Channel from a slice. All values in the slice are sent to the channel in order.

Example

channel := FromSlice(pipeline, []int{1,2,3})