MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / next

Method next

observable_operator.go:285–294  ·  view source on GitHub ↗
(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions)

Source from the content-addressed store, hash-verified

283}
284
285func (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
296func (op *averageInt32Operator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
297 defaultErrorFuncOperator(ctx, item, dst, operatorOptions)

Callers

nothing calls this directly

Calls 2

ErrorFunction · 0.85
SendContextMethod · 0.80

Tested by

no test coverage detected