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

Method next

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

Source from the content-addressed store, hash-verified

201}
202
203func (op *averageInt8Operator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
204 switch v := item.V.(type) {
205 default:
206 Error(IllegalInputError{error: fmt.Sprintf("expected type: int8, got: %t", item)}).SendContext(ctx, dst)
207 operatorOptions.stop()
208 case int8:
209 op.sum += v
210 op.count++
211 }
212}
213
214func (op *averageInt8Operator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
215 defaultErrorFuncOperator(ctx, item, dst, operatorOptions)

Callers

nothing calls this directly

Calls 2

ErrorFunction · 0.85
SendContextMethod · 0.80

Tested by

no test coverage detected