Transform the items emitted by an Observable by applying a function to each item.
observable := rxgo.Just(1, 2, 3)().
Map(func(_ context.Context, i interface{}) (interface{}, error) {
return i.(int) * 10, nil
})
Output:
10
20
30
Transform the items emitted by an Observable by applying a function to each item.
observable := rxgo.Just(1, 2, 3)().
Map(func(_ context.Context, i interface{}) (interface{}, error) {
return i.(int) * 10, nil
})
Output:
10
20
30