code: func (it *bytesKeyIterator) GetNext() (key string, rev int64, lastReceived bool) {
  	if it.err != nil {
  		return "", 0, true
  	}
  	if it.index >= len(it.keys) {
  		if it.cursor == 0 {
  			return "", 0, true
  		}
  		var err error
  		it.keys, it.cursor, err = scanKeys(it.db, it.pattern, it.cursor)
  		if err != nil {
  			it.err = err
  			it.db.Errorf("GetNext() failed: %s (pattern %s)", err.Error(), it.pattern)
  			return "", 0, true
  		}
  		if len(it.keys) == 0 {
  			return "", 0, it.cursor == 0
  		}
  		it.index = 0
  	}
  
  	key = it.keys[it.index]
  	if it.trimPrefix != nil {
  		key = it.trimPrefix(key)
  	}
  	it.index++
  
  	return key, 0, false
  }
docs: // GetNext returns the next item from the iterator.
  // If the iterator encounters an error or has reached the last item previously, lastReceived is set to true.