diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-17 23:45:06 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-02-17 23:45:06 +0100 |
commit | f57aa864e2b3c721d9511a2d78f0c0106e42677a (patch) | |
tree | 0cc85b4632818b7e9dd72d27a10698843304837b /tree_test.go | |
parent | 6b0a5984ac0c69742e60a39ad9437fd981dbe31b (diff) | |
parent | a72c4ec54bb0502bd230dd007ebd1ef7b381afc7 (diff) | |
download | go-git-f57aa864e2b3c721d9511a2d78f0c0106e42677a.tar.gz |
Merge pull request #30 from scjalliance/consistent-iterators
Improved consistency of Tree iterators
Diffstat (limited to 'tree_test.go')
-rw-r--r-- | tree_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tree_test.go b/tree_test.go index bec55dd..803ec56 100644 --- a/tree_test.go +++ b/tree_test.go @@ -192,7 +192,9 @@ func (s *SuiteTree) TestFiles(c *C) { tree := commit.Tree() var output []string - for file := range tree.Files() { + iter := tree.Files() + defer iter.Close() + for file, err := iter.Next(); err == nil; file, err = iter.Next() { output = append(output, file.Name) } sort.Strings(output) |