DefaultIfEmpty Operator

February 25, 2020 ยท View on GitHub

Overview

Emit items from the source Observable, or a default item if the source Observable emits nothing.

Example

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

Output:

1

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithErrorStrategy

  • WithPublishStrategy

Contents

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