code: func NewPackfileIter(
  	fs billy.Filesystem,
  	f billy.File,
  	idxFile billy.File,
  	t plumbing.ObjectType,
  	keepPack bool,
  ) (storer.EncodedObjectIter, error) {
  	idx := idxfile.NewMemoryIndex()
  	if err := idxfile.NewDecoder(idxFile).Decode(idx); err != nil {
  		return nil, err
  	}
  
  	if err := idxFile.Close(); err != nil {
  		return nil, err
  	}
  
  	seen := make(map[plumbing.Hash]struct{})
  	return newPackfileIter(fs, f, t, seen, idx, nil, keepPack)
  }
docs: // NewPackfileIter returns a new EncodedObjectIter for the provided packfile
  // and object type. Packfile and index file will be closed after they're
  // used. If keepPack is true the packfile won't be closed after the iteration
  // finished.