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

None

func (input *Channel[T]) None(predicate func(T) bool) <-chan bool

None determines if no input value matches the predicate.

If no value matches the predicate, true is sent to the returned channel when all input values have been processed, or the pipeline is canceled.

If instead some value matches the predicate, false is immediately sent to the returned channel and no more input values are read.

Examples

input.None(func(value int) bool { return value > 3 })

output := input.None(func(value int) bool { return value >= 2 })