Skip to content

Commit

Permalink
Merge pull request #10 from anuraaga/patch-1
Browse files Browse the repository at this point in the history
Fix incorrect function names in README sample code
  • Loading branch information
mumbleskates authored Jan 9, 2025
2 parents ad9b086 + f8ec85e commit 8741d72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ For the more complex chore of running work that produces results which are aggre
* `parallel.CollectWithErrs[T](executor)`, for `func(context.Context) (T, error)`
* `MultiError`-returning version of `Collect[T]` which, like `GatherErrs`, does not halt when an error occurs
```go
group := parallel.Collect[int](parallel.Unlimited(ctx))
group := parallel.CollectWithErrs[int](parallel.Unlimited(ctx))
group.Go(func(ctx context.Context) (int, error) {
return 1, nil
})
Expand All @@ -164,7 +164,7 @@ For the more complex chore of running work that produces results which are aggre
* `MultiError`-returning version of `Feed`
```go
result := make(map[int]bool)
group := parallel.FeedWithErr(parallel.Unlimited(ctx),
group := parallel.FeedWithErrs(parallel.Unlimited(ctx),
func(ctx context.Context, n int) error {
// values from the functions sent to the group end up here,
// but only if there was no error!
Expand Down

0 comments on commit 8741d72

Please sign in to comment.