Similar to First
, but we pass a default item that will be emitted if the source Observable fails to emit any items.
observable := rxgo.Empty().FirstOrDefault(1)
Output:
1
Similar to First
, but we pass a default item that will be emitted if the source Observable fails to emit any items.
observable := rxgo.Empty().FirstOrDefault(1)
Output:
1