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

replace os.SEEK_SET to io.SeekStart #6

Merged
merged 1 commit into from
Feb 6, 2019
Merged

Conversation

saromanov
Copy link
Contributor

Hi! I've just replaced os.SEEK_SET(since its deprecated) to io.SeekStart

@dimkouv dimkouv merged commit 38d8ad7 into dimkouv:master Feb 6, 2019
@dimkouv
Copy link
Owner

dimkouv commented Feb 6, 2019

Thank you @saromanov !
On massivedl.go function: parseDownloadsFromCsv() I'm currently reading every line until I reach the offset.
I think it would be better to use in.Seek instead of reading every line, what do you think? Can you write an update for it?

@saromanov
Copy link
Contributor Author

@dimkouv You can try to run it with seek after open the file. It should be better then iterate until the position, yes
Also note, i found that you parse the .csv file by the hand, but better to use go package encoding/csv. It contains examples for read and write, so it shouldn't be problems to integrate it. After this, you'll sure, that your csv reader will working correct 😉

@dimkouv
Copy link
Owner

dimkouv commented Feb 6, 2019

@saromanov Great, thanks

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

Successfully merging this pull request may close these issues.

2 participants