Discard any items emitted by an Observable after a second Observable emits an item or terminates.
observable := rxgo.Just(1, 2, 3, 4, 5)().TakeUntil(func(i interface{}) bool {
return i == 3
})
Output:
1
2
3
Discard any items emitted by an Observable after a second Observable emits an item or terminates.
observable := rxgo.Just(1, 2, 3, 4, 5)().TakeUntil(func(i interface{}) bool {
return i == 3
})
Output:
1
2
3