]> Cypherpunks repositories - gostls13.git/commitdiff
csv: clarify what a negative FieldsPerRecord means
authorPaul Borman <borman@google.com>
Mon, 5 Mar 2012 18:34:12 +0000 (13:34 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 5 Mar 2012 18:34:12 +0000 (13:34 -0500)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5729068

src/pkg/encoding/csv/reader.go

index 9aa398e58b28d30efc77ea4b0c53b0b440c5b5d3..db4d988526f0623165d380c398a85888d528e269 100644 (file)
@@ -92,7 +92,8 @@ var (
 // If FieldsPerRecord is positive, Read requires each record to
 // have the given number of fields.  If FieldsPerRecord is 0, Read sets it to
 // the number of fields in the first record, so that future records must
-// have the same field count.
+// have the same field count.  If FieldsPerRecord is negative, no check is
+// made and records may have a variable number of fields.
 //
 // If LazyQuotes is true, a quote may appear in an unquoted field and a
 // non-doubled quote may appear in a quoted field.