MCPcopy Create free account
hub / github.com/go-git/go-git / ForEach

Method ForEach

plumbing/object/commit_walker_ctime.go:81–101  ·  view source on GitHub ↗
(cb func(*Commit) error)

Source from the content-addressed store, hash-verified

79}
80
81func (w *commitIteratorByCTime) ForEach(cb func(*Commit) error) error {
82 for {
83 c, err := w.Next()
84 if err == io.EOF {
85 break
86 }
87 if err != nil {
88 return err
89 }
90
91 err = cb(c)
92 if err == storer.ErrStop {
93 break
94 }
95 if err != nil {
96 return err
97 }
98 }
99
100 return nil
101}
102
103func (w *commitIteratorByCTime) Close() {}

Callers

nothing calls this directly

Calls 1

NextMethod · 0.95

Tested by

no test coverage detected