Map transforms the items emitted by an OptionalSingle by applying a function to each item.
(apply Func, opts ...Option)
| 41 | |
| 42 | // Map transforms the items emitted by an OptionalSingle by applying a function to each item. |
| 43 | func (o *OptionalSingleImpl) Map(apply Func, opts ...Option) OptionalSingle { |
| 44 | return optionalSingle(o.parent, o, func() operator { |
| 45 | return &mapOperatorOptionalSingle{apply: apply} |
| 46 | }, false, true, opts...) |
| 47 | } |
| 48 | |
| 49 | // Observe observes an OptionalSingle by returning its channel. |
| 50 | func (o *OptionalSingleImpl) Observe(opts ...Option) <-chan Item { |
nothing calls this directly
no test coverage detected