(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions)
| 756 | } |
| 757 | |
| 758 | func (op *distinctOperator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 759 | key, err := op.apply(ctx, item.V) |
| 760 | if err != nil { |
| 761 | Error(err).SendContext(ctx, dst) |
| 762 | operatorOptions.stop() |
| 763 | return |
| 764 | } |
| 765 | _, ok := op.keyset[key] |
| 766 | if !ok { |
| 767 | item.SendContext(ctx, dst) |
| 768 | } |
| 769 | op.keyset[key] = nil |
| 770 | } |
| 771 | |
| 772 | func (op *distinctOperator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 773 | defaultErrorFuncOperator(ctx, item, dst, operatorOptions) |
nothing calls this directly
no test coverage detected