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

Method next

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

Source from the content-addressed store, hash-verified

160}
161
162func (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
173func (op *averageIntOperator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
174 defaultErrorFuncOperator(ctx, item, dst, operatorOptions)

Callers

nothing calls this directly

Calls 2

ErrorFunction · 0.85
SendContextMethod · 0.80

Tested by

no test coverage detected