MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / channelValue

Function channelValue

util_test.go:17–31  ·  view source on GitHub ↗
(ctx context.Context, items ...interface{})

Source from the content-addressed store, hash-verified

15)
16
17func channelValue(ctx context.Context, items ...interface{}) chan Item {
18 next := make(chan Item)
19 go func() {
20 for _, item := range items {
21 switch item := item.(type) {
22 default:
23 Of(item).SendContext(ctx, next)
24 case error:
25 Error(item).SendContext(ctx, next)
26 }
27 }
28 close(next)
29 }()
30 return next
31}
32
33func testObservable(ctx context.Context, items ...interface{}) Observable {
34 return FromChannel(channelValue(ctx, items...))

Callers 1

testObservableFunction · 0.85

Calls 3

OfFunction · 0.85
ErrorFunction · 0.85
SendContextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…