aboutsummaryrefslogtreecommitdiffstats
path: root/tree_walker.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-22 03:29:05 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-22 03:29:05 +0200
commit2ed3474ab8e52c98a87e390d5128d45d693a115d (patch)
tree6f136c2508c22f6b5146ef08c49821a45a5f2357 /tree_walker.go
parent5b13c1a2e55cb442484d9c7b45389f422b110eec (diff)
downloadgo-git-2ed3474ab8e52c98a87e390d5128d45d693a115d.tar.gz
ForEach review and Commit.Tree err return
Diffstat (limited to 'tree_walker.go')
-rw-r--r--tree_walker.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/tree_walker.go b/tree_walker.go
index 1692c2f..5568e1b 100644
--- a/tree_walker.go
+++ b/tree_walker.go
@@ -3,8 +3,6 @@ package git
import (
"io"
"path"
-
- "gopkg.in/src-d/go-git.v4/core"
)
const (
@@ -93,27 +91,6 @@ func (w *TreeWalker) Next() (name string, entry TreeEntry, obj Object, err error
return
}
-func (w *TreeWalker) ForEach(cb func(fullpath string, e TreeEntry) error) error {
- for {
- path, e, _, err := w.Next()
- if err != nil {
- if err == io.EOF {
- return nil
- }
-
- return err
- }
-
- if err := cb(path, e); err != nil {
- if err == core.ErrStop {
- return nil
- }
-
- return err
- }
- }
-}
-
// Tree returns the tree that the tree walker most recently operated on.
func (w *TreeWalker) Tree() *Tree {
current := len(w.stack) - 1