diff options
Diffstat (limited to 'objects_test.go')
-rw-r--r-- | objects_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/objects_test.go b/objects_test.go index e8c5d6e..eadf65a 100644 --- a/objects_test.go +++ b/objects_test.go @@ -6,7 +6,7 @@ import ( . "gopkg.in/check.v1" "gopkg.in/src-d/go-git.v3/core" - "gopkg.in/src-d/go-git.v3/storages/memory" + "gopkg.in/src-d/go-git.v3/storage/memory" ) type ObjectsSuite struct { @@ -59,8 +59,9 @@ func (s *ObjectsSuite) TestParseTree(c *C) { c.Assert(tree.Entries[".gitignore"].Hash.String(), Equals, "32858aad3c383ed1ff0a0f9bdf231d54a00c9e88") count := 0 - ch := tree.Files() - for f := range ch { + iter := tree.Files() + defer iter.Close() + for f, err := iter.Next(); err == nil; f, err = iter.Next() { count++ if f.Name == "go/example.go" { content, _ := ioutil.ReadAll(f) |