(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions)
| 283 | } |
| 284 | |
| 285 | func (op *averageInt32Operator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 286 | switch v := item.V.(type) { |
| 287 | default: |
| 288 | Error(IllegalInputError{error: fmt.Sprintf("expected type: int32, got: %t", item)}).SendContext(ctx, dst) |
| 289 | operatorOptions.stop() |
| 290 | case int32: |
| 291 | op.sum += v |
| 292 | op.count++ |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | func (op *averageInt32Operator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 297 | defaultErrorFuncOperator(ctx, item, dst, operatorOptions) |
nothing calls this directly
no test coverage detected