aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-03-06 10:31:21 +0100
committerAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-03-06 10:38:15 +0100
commit0c82b411f6cdf4ec66689042d77c35efe41106c3 (patch)
tree71a2c76c208730fa2f70f34f6737cc24710cf1ba
parentfa75ab40f9d0447a8b670c991c3fcf8c1d5c3081 (diff)
downloadgo-git-0c82b411f6cdf4ec66689042d77c35efe41106c3.tar.gz
Make referenceFilteredIter private
-rw-r--r--plumbing/storer/reference.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plumbing/storer/reference.go b/plumbing/storer/reference.go
index 32265fe..a261486 100644
--- a/plumbing/storer/reference.go
+++ b/plumbing/storer/reference.go
@@ -28,7 +28,7 @@ type ReferenceIter interface {
Close()
}
-type ReferenceFilteredIter struct {
+type referenceFilteredIter struct {
ff func(r *plumbing.Reference) bool
iter ReferenceIter
}
@@ -38,12 +38,12 @@ type ReferenceFilteredIter struct {
// provided function.
func NewReferenceFilteredIter(
ff func(r *plumbing.Reference) bool, iter ReferenceIter) ReferenceIter {
- return &ReferenceFilteredIter{ff, iter}
+ return &referenceFilteredIter{ff, iter}
}
// Next returns the next reference from the iterator. If the iterator has reached
// the end it will return io.EOF as an error.
-func (iter *ReferenceFilteredIter) Next() (*plumbing.Reference, error) {
+func (iter *referenceFilteredIter) Next() (*plumbing.Reference, error) {
for {
r, err := iter.iter.Next()
if err != nil {
@@ -61,7 +61,7 @@ func (iter *ReferenceFilteredIter) Next() (*plumbing.Reference, error) {
// ForEach call the cb function for each reference contained on this iter until
// an error happens or the end of the iter is reached. If ErrStop is sent
// the iteration is stopped but no error is returned. The iterator is closed.
-func (iter *ReferenceFilteredIter) ForEach(cb func(*plumbing.Reference) error) error {
+func (iter *referenceFilteredIter) ForEach(cb func(*plumbing.Reference) error) error {
defer iter.Close()
for {
r, err := iter.Next()
@@ -85,7 +85,7 @@ func (iter *ReferenceFilteredIter) ForEach(cb func(*plumbing.Reference) error) e
}
// Close releases any resources used by the iterator.
-func (iter *ReferenceFilteredIter) Close() {
+func (iter *referenceFilteredIter) Close() {
iter.iter.Close()
}