code: func (c *cursor) Delete() error {
  	// Ensure transaction state is valid.
  	if err := c.bucket.tx.checkClosed(); err != nil {
  		return err
  	}
  
  	// Error if the cursor is exhausted.
  	if c.currentIter == nil {
  		str := "cursor is exhausted"
  		return makeDbErr(database.ErrIncompatibleValue, str, nil)
  	}
  
  	// Do not allow buckets to be deleted via the cursor.
  	key := c.currentIter.Key()
  	if bytes.HasPrefix(key, bucketIndexPrefix) {
  		str := "buckets may not be deleted from a cursor"
  		return makeDbErr(database.ErrIncompatibleValue, str, nil)
  	}
  
  	c.bucket.tx.deleteKey(copySlice(key), true)
  	return nil
  }
docs: // Delete removes the current key/value pair the cursor is at without
  // invalidating the cursor.
  //
  // Returns the following errors as required by the interface contract:
  //   - ErrIncompatibleValue if attempted when the cursor points to a nested
  //     bucket
  //   - ErrTxNotWritable if attempted against a read-only transaction
  //   - ErrTxClosed if the transaction has already been closed
  //
  // This function is part of the database.Cursor interface implementation.