Method
ForEach
(cb func(plumbing.EncodedObject) error)
Source from the content-addressed store, hash-verified
| 836 | } |
| 837 | |
| 838 | func (iter *objectsIter) ForEach(cb func(plumbing.EncodedObject) error) error { |
| 839 | for { |
| 840 | o, err := iter.Next() |
| 841 | if err != nil { |
| 842 | if err == io.EOF { |
| 843 | return nil |
| 844 | } |
| 845 | return err |
| 846 | } |
| 847 | |
| 848 | if err := cb(o); err != nil { |
| 849 | return err |
| 850 | } |
| 851 | } |
| 852 | } |
| 853 | |
| 854 | func (iter *objectsIter) Close() { |
| 855 | iter.h = []plumbing.Hash{} |
Callers
nothing calls this directly
Tested by
no test coverage detected