aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/blob.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-02-07 10:02:20 +0100
committerSantiago M. Mola <santi@mola.io>2017-02-07 10:02:20 +0100
commit1f39465975d56bbb02f5cdfb1e3e77f41c613f1d (patch)
treeac6b8caf7237a88092cbd20880d1beb118a668e3 /plumbing/object/blob.go
parent2b1efd219e1f20d9a0bc380a26074c9d8de2ae1f (diff)
downloadgo-git-1f39465975d56bbb02f5cdfb1e3e77f41c613f1d.tar.gz
doc: improve object iterators godoc.
Diffstat (limited to 'plumbing/object/blob.go')
-rw-r--r--plumbing/object/blob.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/plumbing/object/blob.go b/plumbing/object/blob.go
index 76b0e7d..e44753c 100644
--- a/plumbing/object/blob.go
+++ b/plumbing/object/blob.go
@@ -92,16 +92,17 @@ type BlobIter struct {
s storer.EncodedObjectStorer
}
-// NewBlobIter returns a BlobIter for the given repository and underlying
-// object iterator.
+// NewBlobIter takes a storer.EncodedObjectStorer and a
+// storer.EncodedObjectIter and returns a *BlobIter that iterates over all
+// blobs contained in the storer.EncodedObjectIter.
//
-// The returned BlobIter will automatically skip over non-blob objects.
+// Any non-blob object returned by the storer.EncodedObjectIter is skipped.
func NewBlobIter(s storer.EncodedObjectStorer, iter storer.EncodedObjectIter) *BlobIter {
return &BlobIter{iter, s}
}
-// Next moves the iterator to the next blob and returns a pointer to it. If it
-// has reached the end of the set it will return io.EOF.
+// Next moves the iterator to the next blob and returns a pointer to it. If
+// there are no more blobs, it returns io.EOF.
func (iter *BlobIter) Next() (*Blob, error) {
for {
obj, err := iter.EncodedObjectIter.Next()