Commit 90d43ad7 authored by Rob Pike's avatar Rob Pike

encoding/csv: document ReadAll behavior at EOF

Fixes #2847.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5641050
parent c02db82b
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment