(ctx context.Context, items ...interface{})
| 15 | ) |
| 16 | |
| 17 | func 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 | |
| 33 | func testObservable(ctx context.Context, items ...interface{}) Observable { |
| 34 | return FromChannel(channelValue(ctx, items...)) |
no test coverage detected
searching dependent graphs…