1
0
mirror of https://github.com/golang/go synced 2024-11-24 17:00:01 -07:00

encoding/csv: document ReadAll behavior at EOF

Fixes #2847.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5641050
This commit is contained in:
Rob Pike 2012-02-08 14:24:04 +11:00
parent c02db82b83
commit 90d43ad720

View File

@ -156,6 +156,9 @@ func (r *Reader) Read() (record []string, err error) {
// ReadAll reads all the remaining records from r.
// Each record is a slice of fields.
// A successful call returns err == nil, not err == EOF. Because ReadAll is
// defined to read until EOF, it does not treat end of file as an error to be
// reported.
func (r *Reader) ReadAll() (records [][]string, err error) {
for {
record, err := r.Read()