code: func (tx *Tx) Delete(key string) (val string, err error) {
  	if tx.db == nil {
  		return "", ErrTxClosed
  	} else if !tx.writable {
  		return "", ErrTxNotWritable
  	} else if tx.wc.itercount > 0 {
  		return "", ErrTxIterating
  	}
  	item := tx.db.deleteFromDatabase(&dbItem{key: key})
  	if item == nil {
  		return "", ErrNotFound
  	}
  	// create a rollback entry if there has not been a deleteAll call.
  	if tx.wc.rbkeys == nil {
  		if _, ok := tx.wc.rollbackItems[key]; !ok {
  			tx.wc.rollbackItems[key] = item
  		}
  	}
  	if tx.db.persist {
  		tx.wc.commitItems[key] = nil
  	}
  	// Even though the item has been deleted, we still want to check
  	// if it has expired. An expired item should not be returned.
  	if item.expired() {
  		// The item exists in the tree, but has expired. Let's assume that
  		// the caller is only interested in items that have not expired.
  		return "", ErrNotFound
  	}
  	return item.val, nil
  }
docs: // Delete removes an item from the database based on the item's key. If the item
  // does not exist or if the item has expired then ErrNotFound is returned.
  //
  // Only a writable transaction can be used for this operation.
  // This operation is not allowed during iterations such as Ascend* & Descend*.