generated from snivilised/astrolib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rx): add RxAssert with SendItems (#123)
- Loading branch information
1 parent
121b703
commit 4024af1
Showing
23 changed files
with
876 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package rx | ||
|
||
// Amb takes several Observables, emit all of the items from only the first of these Observables | ||
// to emit an item or notification. | ||
func Amb[I any](observables []Observable[I], opts ...Option[I]) Observable[I] { | ||
_, _ = observables, opts | ||
|
||
panic("Amb: NOT-IMPL") | ||
} | ||
|
||
// FromChannel creates a cold observable from a channel. | ||
func FromChannel[I any](next <-chan Item[I], opts ...Option[I]) Observable[I] { | ||
option := parseOptions(opts...) | ||
ctx := option.buildContext(emptyContext) | ||
|
||
return &ObservableImpl[I]{ | ||
parent: ctx, | ||
iterable: newChannelIterable(next, opts...), | ||
} | ||
} | ||
|
||
func parseOptions[I any](opts ...Option[I]) Option[I] { | ||
o := new(funcOption[I]) | ||
for _, opt := range opts { | ||
opt.apply(o) | ||
} | ||
|
||
return o | ||
} |
Oops, something went wrong.