Scan advances the scan line and yields either a new value for Entry(), or an Err(). It returns true or false, whether or not it can continue scanning for more entries.
()
| 146 | // Err(). It returns true or false, whether or not it can continue scanning for |
| 147 | // more entries. |
| 148 | func (s *DiffIndexScanner) Scan() bool { |
| 149 | if !s.prepareScan() { |
| 150 | return false |
| 151 | } |
| 152 | |
| 153 | s.next, s.err = s.scan(s.from.Text()) |
| 154 | if s.err != nil { |
| 155 | s.err = errors.Wrap(s.err, tr.Tr.Get("`git diff-index` scan")) |
| 156 | } |
| 157 | |
| 158 | return s.err == nil |
| 159 | } |
| 160 | |
| 161 | // Entry returns the last entry that was Scan()'d by the DiffIndexScanner. |
| 162 | func (s *DiffIndexScanner) Entry() *DiffIndexEntry { return s.next } |
no test coverage detected