MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / ReadAll

Method ReadAll

pkg/util/encoding/csv/reader.go:212–223  ·  view source on GitHub ↗

ReadAll reads all the remaining records from r. Each record is a slice of fields. A successful call returns err == nil, not err == io.EOF. Because ReadAll is defined to read until EOF, it does not treat end of file as an error to be reported.

()

Source from the content-addressed store, hash-verified

210// defined to read until EOF, it does not treat end of file as an error to be
211// reported.
212func (r *Reader) ReadAll() (records [][]string, err error) {
213 for {
214 record, err := r.readRecord(nil)
215 if err == io.EOF {
216 return records, nil
217 }
218 if err != nil {
219 return nil, err
220 }
221 records = append(records, record)
222 }
223}
224
225// readLine reads the next line (with the trailing endline).
226// If EOF is hit without a trailing endline, it will be omitted.

Callers 1

NewDecoderMethod · 0.80

Calls 1

readRecordMethod · 0.95

Tested by

no test coverage detected