code: func (c *cursor) Key() []byte {
  	// Ensure transaction state is valid.
  	if err := c.bucket.tx.checkClosed(); err != nil {
  		return nil
  	}
  
  	// Nothing to return if cursor is exhausted.
  	if c.currentIter == nil {
  		return nil
  	}
  
  	// Slice out the actual key name and make a copy since it is no longer
  	// valid after iterating to the next item.
  	//
  	// The key is after the bucket index prefix and parent ID when the
  	// cursor is pointing to a nested bucket.
  	key := c.currentIter.Key()
  	if bytes.HasPrefix(key, bucketIndexPrefix) {
  		key = key[len(bucketIndexPrefix)+4:]
  		return copySlice(key)
  	}
  
  	// The key is after the bucket ID when the cursor is pointing to a
  	// normal entry.
  	key = key[len(c.bucket.id):]
  	return copySlice(key)
  }
docs: // Key returns the current key the cursor is pointing to.
  //
  // This function is part of the database.Cursor interface implementation.