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

encoding/csv: document that comments must begin at start of line, even when TrimLeadingSpace is true #13775

Closed
kennwhite opened this issue Dec 29, 2015 · 1 comment
Labels
Documentation FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@kennwhite
Copy link

In looking at the docs and in the official example for csv.ReadAll() it's not clear what order TrimLeadingSpace processing occurs (i.e., prior to parsing for comments). It appears that comments are recognized only if they have no leading spaces. See test case here: https://play.golang.org/p/m8GfvFWiEc
This is a modified version of the ReadAll() example: https://golang.org/pkg/encoding/csv/#example_Reader_ReadAll
If this is expected/defined behavior, it might be worth adding a note to the documentation or example on golang.org.

@kennwhite kennwhite changed the title csv Read() and ReadALL() unexpected behavior for TrimLeadingSpace and comments csv Read() and ReadAll() unexpected behavior for TrimLeadingSpace and comments Dec 29, 2015
@mikioh mikioh changed the title csv Read() and ReadAll() unexpected behavior for TrimLeadingSpace and comments encoding/csv: Read() and ReadAll() unexpected behavior for TrimLeadingSpace and comments Dec 30, 2015
@bradfitz bradfitz added this to the Go1.7 milestone Jan 20, 2016
@rsc rsc changed the title encoding/csv: Read() and ReadAll() unexpected behavior for TrimLeadingSpace and comments encoding/csv: document that comments must begin at start of line, even when TrimLeadingSpace is true May 18, 2016
@quentinmit quentinmit added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label May 19, 2016
@gopherbot
Copy link

CL https://golang.org/cl/23302 mentions this issue.

@rsc rsc modified the milestones: Go1.7Maybe, Go1.7 May 27, 2016
@golang golang locked and limited conversation to collaborators Jun 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

5 participants