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 there is no data left to be read, Rea
()
| 195 | // If ReuseRecord is true, the returned slice may be shared |
| 196 | // between multiple calls to Read. |
| 197 | func (r *Reader) Read() (record []string, err error) { |
| 198 | if r.ReuseRecord { |
| 199 | record, err = r.readRecord(r.lastRecord) |
| 200 | r.lastRecord = record |
| 201 | } else { |
| 202 | record, err = r.readRecord(nil) |
| 203 | } |
| 204 | return record, err |
| 205 | } |
| 206 | |
| 207 | // ReadAll reads all the remaining records from r. |
| 208 | // Each record is a slice of fields. |
no test coverage detected