TakeWhile Operator

February 25, 2020 ยท View on GitHub

Overview

Mirror items emitted by an Observable until a specified condition becomes false.

Example

observable := rxgo.Just(1, 2, 3, 4, 5)().TakeWhile(func(i interface{}) bool {
	return i != 3
})

Output:

1
2

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithErrorStrategy

  • WithPublishStrategy

Contents

  1. 1Overview
  2. 2Example
  3. 3Options