Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1580)

Issue 12294043: code review 12294043: encoding/csv: always allow trailing commas (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by peted
Modified:
10 years, 9 months ago
Reviewers:
r
CC:
golang-dev, rsc, r
Visibility:
Public.

Description

encoding/csv: always allow trailing commas Original CL by rsc (11916045): The motivation for disallowing them was RFC 4180 saying "The last field in the record must not be followed by a comma." I believe this is an admonition to CSV generators, not readers. When reading, anything followed by a comma is not the last field. Fixes issue 5892.

Patch Set 1 #

Patch Set 2 : diff -r c8da77d7e912 https://code.google.com/p/go #

Patch Set 3 : diff -r c8da77d7e912 https://code.google.com/p/go #

Total comments: 4

Patch Set 4 : diff -r ef69e6cf3bd0 https://code.google.com/p/go #

Patch Set 5 : diff -r ef69e6cf3bd0 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -59 lines) Patch
M src/pkg/encoding/csv/reader.go View 1 2 3 4 chunks +14 lines, -44 lines 0 comments Download
M src/pkg/encoding/csv/reader_test.go View 1 3 chunks +18 lines, -15 lines 0 comments Download

Messages

Total messages: 7
peted
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 9 months ago (2013-08-01 23:39:53 UTC) #1
rsc
https://codereview.appspot.com/12294043/diff/6001/src/pkg/encoding/csv/reader.go File src/pkg/encoding/csv/reader.go (right): https://codereview.appspot.com/12294043/diff/6001/src/pkg/encoding/csv/reader.go#newcode257 src/pkg/encoding/csv/reader.go:257: r1, err := r.readRune() Thanks for finding the bug ...
10 years, 9 months ago (2013-08-02 16:58:21 UTC) #2
peted
CL updated. https://codereview.appspot.com/12294043/diff/6001/src/pkg/encoding/csv/reader.go File src/pkg/encoding/csv/reader.go (right): https://codereview.appspot.com/12294043/diff/6001/src/pkg/encoding/csv/reader.go#newcode257 src/pkg/encoding/csv/reader.go:257: r1, err := r.readRune() On 2013/08/02 16:58:22, ...
10 years, 9 months ago (2013-08-02 18:58:48 UTC) #3
peted
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 9 months ago (2013-08-02 18:59:42 UTC) #4
peted
On 2013/08/02 18:59:42, peted wrote: > Hello mailto:golang-dev@googlegroups.com, mailto:rsc@golang.org (cc: > mailto:golang-dev@googlegroups.com), > > Please ...
10 years, 9 months ago (2013-08-08 09:35:34 UTC) #5
r
LGTM
10 years, 9 months ago (2013-08-09 05:45:27 UTC) #6
r
10 years, 9 months ago (2013-08-09 05:46:08 UTC) #7
*** Submitted as https://code.google.com/p/go/source/detail?r=9657ca9fe9c7 ***

encoding/csv: always allow trailing commas

Original CL by rsc (11916045):

The motivation for disallowing them was RFC 4180 saying
"The last field in the record must not be followed by a comma."
I believe this is an admonition to CSV generators, not readers.
When reading, anything followed by a comma is not the last field.

Fixes issue 5892.

R=golang-dev, rsc, r
CC=golang-dev
https://codereview.appspot.com/12294043

Committer: Rob Pike <r@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b