]> Cypherpunks repositories - gostls13.git/commit
csv: fix issue 2366 - overly aggressive TrimLeadingSpace
authorPaul Borman <borman@google.com>
Mon, 17 Oct 2011 18:10:39 +0000 (11:10 -0700)
committerRob Pike <r@golang.org>
Mon, 17 Oct 2011 18:10:39 +0000 (11:10 -0700)
commiteea86de656d74bafe7c76a5242eaa51d80e2b454
treece2c76002760141f82db9fa201302cbe30df0700
parent64471ae76204b116ab28c13f7008e90ae826a379
csv: fix issue 2366 - overly aggressive TrimLeadingSpace

Address the issue coalescing two records together when TrimLeadingSpace
is set to true.

The input

        a,b,
        c,d,e

Would result with a singled a,b,c,d,e record.
With TrailingComma set to true it should give two records.
With TrailingComma set to false it should be an error.

Fixes #2366.

R=golang-dev, go.peter.90, r
CC=golang-dev
https://golang.org/cl/5284046
src/pkg/csv/reader.go
src/pkg/csv/reader_test.go