prepareScan clears out the results from the last Scan() loop, and advances the internal scanner to fetch a new line of Text().
()
| 167 | // prepareScan clears out the results from the last Scan() loop, and advances |
| 168 | // the internal scanner to fetch a new line of Text(). |
| 169 | func (s *DiffIndexScanner) prepareScan() bool { |
| 170 | s.next, s.err = nil, nil |
| 171 | if !s.from.Scan() { |
| 172 | s.err = s.from.Err() |
| 173 | return false |
| 174 | } |
| 175 | |
| 176 | return true |
| 177 | } |
| 178 | |
| 179 | // scan parses the given line and returns a `*DiffIndexEntry` or an error, |
| 180 | // depending on whether or not the parse was successful. |