Remove usage of channels for ForEach #90

Merged
carlosmn merged 2 commits from unchanify into master 2014-05-07 08:12:00 -05:00
carlosmn commented 2014-05-06 07:46:25 -05:00 (Migrated from github.com)

A channel does not let us report errors, just close the channel. So we can't distinguish between running out of data and encountering an error, which is obviously bad.

We have closures in Go, so having to use a callback instead of using range over a channel isn't that big of a deal, and it lets us do error handling, which is something we should always be able to do.

A channel does not let us report errors, just close the channel. So we can't distinguish between running out of data and encountering an error, which is obviously bad. We have closures in Go, so having to use a callback instead of using `range` over a channel isn't that big of a deal, and it lets us do error handling, which is something we should always be able to do.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#90
No description provided.