func (iter *EncodedObjectSliceIter) Close() {
	iter.series = []plumbing.EncodedObject{}
}
Close releases any resources used by the iterator.
package storer
import (
	"errors"
	"io"
	"time"
	"gopkg.in/src-d/go-git.v4/plumbing"
)
var (
	ErrStop = errors.New("stop iter")
)
type EncodedObjectStorer interface {
	NewEncodedObject() plumbing.EncodedObject
	SetEncodedObject(plumbing.EncodedObject) (plumbing.Hash, error)
	EncodedObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
	IterEncodedObjects(plumbing.ObjectType) (EncodedObjectIter, error)
	HasEncodedObject(plumbing.Hash) error
}
type DeltaObjectStorer interface {
	DeltaObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
}
type Transactioner interface {
	Begin() Transaction
}
type LooseObjectStorer interface {
	ForEachObjectHash(func(plumbing.Hash) error) error
	LooseObjectTime(plumbing.Hash) (time.Time, error)
	DeleteLooseObject(plumbing.Hash) error
}
type PackedObjectStorer interface {
	ObjectPacks() ([]plumbing.Hash, error)
	DeleteOldObjectPackAndIndex(plumbing.Hash, time.Time) error
}
type PackfileWriter interface {
	PackfileWriter() (io.WriteCloser, error)
}
type EncodedObjectIter interface {
	Next() (plumbing.EncodedObject, error)
	ForEach(func(plumbing.EncodedObject) error) error
	Close()
}
type Transaction interface {
	SetEncodedObject(plumbing.EncodedObject) (plumbing.Hash, error)
	EncodedObject(plumbing.ObjectType, plumbing.Hash) (plumbing.EncodedObject, error)
	Commit() error
	Rollback() error
}
type EncodedObjectLookupIter struct {
	storage EncodedObjectStorer
	series  []plumbing.Hash
	t       plumbing.ObjectType
	pos     int
}
func NewEncodedObjectLookupIter(
	storage EncodedObjectStorer, t plumbing.ObjectType, series []plumbing.Hash) *EncodedObjectLookupIter {
	return &EncodedObjectLookupIter{
		storage: storage,
		series:  series,
		t:       t,
	}
}
func (iter *EncodedObjectLookupIter) Next() (plumbing.EncodedObject, error) {
	if iter.pos >= len(iter.series) {
		return nil, io.EOF
	}
	hash := iter.series[iter.pos]
	obj, err := iter.storage.EncodedObject(iter.t, hash)
	if err == nil {
		iter.pos++
	}
	return obj, err
}
func (iter *EncodedObjectLookupIter) ForEach(cb func(plumbing.EncodedObject) error) error {
	return ForEachIterator(iter, cb)
}
func (iter *EncodedObjectLookupIter) Close() {
	iter.pos = len(iter.series)
}
type EncodedObjectSliceIter struct {
	series []plumbing.EncodedObject
	pos    int
}
func NewEncodedObjectSliceIter(series []plumbing.EncodedObject) *EncodedObjectSliceIter {
	return &EncodedObjectSliceIter{
		series: series,
	}
}
func (iter *EncodedObjectSliceIter) Next() (plumbing.EncodedObject, error) {
	if len(iter.series) == 0 {
		return nil, io.EOF
	}
	obj := iter.series[0]
	iter.series = iter.series[1:]
	return obj, nil
}
func (iter *EncodedObjectSliceIter) ForEach(cb func(plumbing.EncodedObject) error) error {
	return ForEachIterator(iter, cb)
}