ForEach call the cb function for each commit contained on this iter until an error appends or the end of the iter is reached. If ErrStop is sent the iteration is stopped but no error is returned. The iterator is closed.
(cb func(*Commit) error)
| 583 | // an error appends or the end of the iter is reached. If ErrStop is sent |
| 584 | // the iteration is stopped but no error is returned. The iterator is closed. |
| 585 | func (iter *storerCommitIter) ForEach(cb func(*Commit) error) error { |
| 586 | return iter.EncodedObjectIter.ForEach(func(obj plumbing.EncodedObject) error { |
| 587 | c, err := DecodeCommit(iter.s, obj) |
| 588 | if err != nil { |
| 589 | return err |
| 590 | } |
| 591 | |
| 592 | return cb(c) |
| 593 | }) |
| 594 | } |
| 595 | |
| 596 | func (iter *storerCommitIter) Close() { |
| 597 | iter.EncodedObjectIter.Close() |
nothing calls this directly
no test coverage detected