MCPcopy Index your code
hub / github.com/go-git/go-git / ForEach

Method ForEach

plumbing/object/commit_walker.go:163–183  ·  view source on GitHub ↗
(cb func(*Commit) error)

Source from the content-addressed store, hash-verified

161}
162
163func (w *commitPostIterator) ForEach(cb func(*Commit) error) error {
164 for {
165 c, err := w.Next()
166 if err == io.EOF {
167 break
168 }
169 if err != nil {
170 return err
171 }
172
173 err = cb(c)
174 if err == storer.ErrStop {
175 break
176 }
177 if err != nil {
178 return err
179 }
180 }
181
182 return nil
183}
184
185func (w *commitPostIterator) Close() {}
186

Callers

nothing calls this directly

Calls 1

NextMethod · 0.95

Tested by

no test coverage detected