encoding/csv: document that comments must begin at start of line, even when TrimLeadingSpace is true #13775
Labels
Documentation
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
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.
The text was updated successfully, but these errors were encountered: