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

Method next

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

Source from the content-addressed store, hash-verified

324}
325
326func (op *averageInt64Operator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
327 switch v := item.V.(type) {
328 default:
329 Error(IllegalInputError{error: fmt.Sprintf("expected type: int64, got: %t", item)}).SendContext(ctx, dst)
330 operatorOptions.stop()
331 case int64:
332 op.sum += v
333 op.count++
334 }
335}
336
337func (op *averageInt64Operator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
338 defaultErrorFuncOperator(ctx, item, dst, operatorOptions)

Callers

nothing calls this directly

Calls 2

ErrorFunction · 0.85
SendContextMethod · 0.80

Tested by

no test coverage detected