(fs []Producer, opts ...Option)
| 14 | } |
| 15 | |
| 16 | func newCreateIterable(fs []Producer, opts ...Option) Iterable { |
| 17 | option := parseOptions(opts...) |
| 18 | next := option.buildChannel() |
| 19 | ctx := option.buildContext(emptyContext) |
| 20 | |
| 21 | go func() { |
| 22 | defer close(next) |
| 23 | for _, f := range fs { |
| 24 | f(ctx, next) |
| 25 | } |
| 26 | }() |
| 27 | |
| 28 | return &createIterable{ |
| 29 | opts: opts, |
| 30 | next: next, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | func (i *createIterable) Observe(opts ...Option) <-chan Item { |
| 35 | mergedOptions := append(i.opts, opts...) |