(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions)
| 242 | } |
| 243 | |
| 244 | func (op *averageInt16Operator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 245 | switch v := item.V.(type) { |
| 246 | default: |
| 247 | Error(IllegalInputError{error: fmt.Sprintf("expected type: int16, got: %t", item)}).SendContext(ctx, dst) |
| 248 | operatorOptions.stop() |
| 249 | case int16: |
| 250 | op.sum += v |
| 251 | op.count++ |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | func (op *averageInt16Operator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { |
| 256 | defaultErrorFuncOperator(ctx, item, dst, operatorOptions) |
nothing calls this directly
no test coverage detected