Skip to content
New issue

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

Give simple synchronized/blocked version of for each function to iterate the reader #56

Open
defia opened this issue Jan 14, 2017 · 1 comment

Comments

@defia
Copy link

defia commented Jan 14, 2017

UnmarshalToCallback first create a channel , start a goroutine to fill the channel, then a loop to read from the channel, and call callback function to handle the object.
I think it's users choice to decide whether to handle the whole process in synchronize or async.

So just give us a function like filepath.Walk, so we can read the csv in streaming, and with a callback that we can returns error to stop the iterate.

@CheerChen
Copy link

I agree with that. Just now I want to use UnmarshalToChan to read line by line and got into trouble using goroutine. It will be easier that reading the csv in synchronize way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants