code: func (f Index) itemFromIterator(it iterator.Iterator, totalPrefix []byte) (i Item, err error) {
  	key := it.Key()
  	if !bytes.HasPrefix(key, totalPrefix) {
  		return i, leveldb.ErrNotFound
  	}
  	// create a copy of key byte slice not to share leveldb underlaying slice array
  	keyItem, err := f.decodeKeyFunc(append([]byte(nil), key...))
  	if err != nil {
  		return i, err
  	}
  	// create a copy of value byte slice not to share leveldb underlaying slice array
  	valueItem, err := f.decodeValueFunc(keyItem, append([]byte(nil), it.Value()...))
  	if err != nil {
  		return i, err
  	}
  	return keyItem.Merge(valueItem), it.Error()
  }
docs: // itemFromIterator returns the Item from the current iterator position.
  // If the complete encoded key does not start with totalPrefix,
  // leveldb.ErrNotFound is returned. Value for totalPrefix must start with
  // Index prefix.