FirstOrDefault Operator

February 25, 2020 ยท View on GitHub

Overview

Similar to First, but we pass a default item that will be emitted if the source Observable fails to emit any items.

Example

observable := rxgo.Empty().FirstOrDefault(1)

Output:

1

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithPublishStrategy

Contents

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