diff options
Diffstat (limited to 'src/encoding/csv/reader.go')
| -rw-r--r-- | src/encoding/csv/reader.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/encoding/csv/reader.go b/src/encoding/csv/reader.go index b83208eb3a..c6a8ed02c1 100644 --- a/src/encoding/csv/reader.go +++ b/src/encoding/csv/reader.go @@ -187,8 +187,9 @@ func NewReader(r io.Reader) *Reader { // Read reads one record (a slice of fields) from r. // If the record has an unexpected number of fields, // Read returns the record along with the error ErrFieldCount. -// Except for that case, Read always returns either a non-nil -// record or a non-nil error, but not both. +// If the record contains a field that cannot be parsed, +// Read returns a partial record along with the parse error. +// The partial record contains all fields read before the error. // If there is no data left to be read, Read returns nil, io.EOF. // If ReuseRecord is true, the returned slice may be shared // between multiple calls to Read. |
