-
Notifications
You must be signed in to change notification settings - Fork 163
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
Switch csv and tsv method 'sv' from ReadAll() to stream each record with Read() #355
Merged
gabriel-vasile
merged 19 commits into
gabriel-vasile:master
from
splashing-atom:streaming-csv-tsv-detection
Oct 10, 2023
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
fe45260
switch csv and tsv method 'sv' from ReadAll() to stream each record w…
viprerk 6677711
add testcases for one/two line csv/tsv
viprerk 6a0aa42
Bump codecov/codecov-action from 3.1.0 to 3.1.1 (#328)
dependabot[bot] b1f8105
Bump actions/setup-go from 3.3.0 to 3.5.0 (#351)
dependabot[bot] a60ff30
Bump actions/checkout from 3.0.2 to 3.3.0 (#357)
dependabot[bot] 6102fd9
Bump github/codeql-action from 2.1.22 to 2.2.4 (#364)
dependabot[bot] f42eeae
Bump golangci/golangci-lint-action from 3.2.0 to 3.4.0 (#360)
dependabot[bot] e3ac364
Upgrade golang.org/x/net dependency (#365)
gabriel-vasile 7780377
Bump github/codeql-action from 2.2.4 to 2.2.5 (#366)
dependabot[bot] 44bb566
Bump golang.org/x/net from 0.7.0 to 0.8.0 (#367)
dependabot[bot] dbcd5ed
replace deprecated ioutil calls (#392)
testwill 3b8e5ee
Bump golang.org/x/net from 0.8.0 to 0.10.0 (#387)
dependabot[bot] 79aa93c
Cosmetics - no code behaviour changes (#397)
gabriel-vasile 8bdb082
Remove old travis build status link from readme (#407)
gabriel-vasile 189fcfd
Group all dependabot PRs together (#409)
gabriel-vasile 35b2558
Bump the gomod group with 1 update
dependabot[bot] c6bfce2
Bump the github-actions group with 5 updates
dependabot[bot] c3ad178
Remove some test files to CSV, TSV
gabriel-vasile 2d392b2
Merge branch 'master' into streaming-csv-tsv-detection
gabriel-vasile File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this only checks for "lines > 1": The loop above could just break out, and there is no point at all to exhaust the reader (which could still be millions of lines?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ReadAll() method would return error if any line in the file was not valid CSV. For this reason the loop calls Read() on each line and returns false overall if any line is not valid CSV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking out of the loop when
lines > 1
means input like this would wrongfully pass as csv:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking and replying!