We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
here is my code
func main() { supplier := make([]rxgo.Producer, 0) supplier = append(supplier, GenCheckFieldTypeFuture(context.Background(), AAA{Foo: "111"})) observable := rxgo.Create(supplier).Map(func(_ context.Context, i interface{}) (interface{}, error) { if v, ok := i.(CheckFieldTypeParam); ok { println(fmt.Sprintf("v type is : %v", reflect.TypeOf(v))) return v, errors.New("asasfqwfq") } return i, nil }, rxgo.WithPool(1)) for item := range observable.Observe() { println(fmt.Sprintf("item.V type is:%v", reflect.TypeOf(item.V))) println(fmt.Sprintf("item.E type is:%v", reflect.TypeOf(item.E))) } }
the out put is
v type is : main.CheckFieldTypeParam item.V type is:<nil> item.E type is:*errors.errorString
Expected behavior I expect item.V is not nil, the framwork should not drop result even if the map fun return an error!!!
The text was updated successfully, but these errors were encountered:
this bug should fix by following code:
func (op *mapOperator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) { res, err := op.apply(ctx, item.V) if err != nil { Of(res).Error(err).SendContext(ctx,** dst) operatorOptions.stop() return } Of(res).SendContext(ctx, dst) }
just add "Of(res)" before line 4
Sorry, something went wrong.
No branches or pull requests
here is my code
the out put is
Expected behavior
I expect item.V is not nil, the framwork should not drop result even if the map fun return an error!!!
The text was updated successfully, but these errors were encountered: