(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions)
| 160 | } |
| 161 | |
| 162 | func (op *averageIntOperator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 163 | switch v := item.V.(type) { |
| 164 | default: |
| 165 | Error(IllegalInputError{error: fmt.Sprintf("expected type: int, got: %t", item)}).SendContext(ctx, dst) |
| 166 | operatorOptions.stop() |
| 167 | case int: |
| 168 | op.sum += v |
| 169 | op.count++ |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | func (op *averageIntOperator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 174 | defaultErrorFuncOperator(ctx, item, dst, operatorOptions) |
nothing calls this directly
no test coverage detected