// DeleteKey removes a single key
765821
func (s *Secret) DeleteKey(key string) error {
	if s.d == nil {
		return nil
	}
	delete(s.d, key)
	return nil
}
1122409
func (m *SessionManager) Delete(key string) error {
	stmt := Sessions.Delete().Where(Sessions.C("key").Equals(key))
	return m.conn.Query(stmt)
}
1235590
func (db *MemDB) Delete(key []byte) {
	db.mtx.Lock()
	defer db.mtx.Unlock()

	db.DeleteNoLock(key)
}
596583
func (k *Keyring) RemoveKey(term uint32) (*Keyring, error) {
	// Ensure this is not the active key
	if term == k.activeTerm {
		return nil, fmt.Errorf("cannot remove active key")
	}

	// Check if this term does not exist
	if _, ok := k.keys[term]; !ok {
		return k, nil
	}

	// Delete the key
	clone := k.Clone()
	delete(clone.keys, term)
	return clone, nil
}
155981
func (m *Mem) Delete(key models.Key) error {
	m.mut.Lock()
	defer m.mut.Unlock()
	delete(m.m, key.String())
	return nil
}
575936
func (c *Cache) Delete(key Key) {
	logger.Debugf("%s - Deleting cache key", key.String())
	value, ok := c.m.Load(key.String())
	if ok {
		c.close(key.String(), value.(future))
		c.m.Delete(key.String())
	}
}
539186
func (c *Scratch) Delete(key string) string {
	c.mu.Lock()
	delete(c.values, key)
	c.mu.Unlock()
	return ""
}
516019
func (trust *NotarySigner) RemoveKey(keyid string) error {
	_, err := trust.kmClient.DeleteKey(context.Background(), &pb.KeyID{ID: keyid})
	return err
}
44236
func (deque *keyedDeque) Delete(key interface{}) (v interface{}) {
	deque.RLock()
	e, ok := deque.index[key]
	deque.RUnlock()

	deque.Lock()
	defer deque.Unlock()

	if ok {
		v = deque.syncedList.Remove(e)
		delete(deque.index, key)
		delete(deque.invertedIndex, e)
	}

	return
}
698471
func (levelDB *LevelDB) DelKey(key string) bool {
	err := levelDB.GolDB.Delete([]byte(key), nil)
	if err != nil {
		golerror.Boohoo("Key "+key+" query failed.", false)
		return false
	}
	return true
}
1258412
func (kv *keyValue) Delete(key string) error {
	kv.mu.Lock()
	defer kv.mu.Unlock()
	err := kv.db.Remove(&bson.M{mgoKey: key})
	if err == mgo.ErrNotFound {
		return nil
	}
	return err
}
587745
func (c *Client) Delete(key string) error {
	return c.deleteRecurse(key, false)
}
944370
func (c *CloudAPI) DeleteKey(keyName string) error {
	if err := c.ProcessFunctionHook(c, keyName); err != nil {
		return err
	}

	for i, key := range c.keys {
		if key.Name == keyName {
			c.keys = append(c.keys[:i], c.keys[i+1:]...)
			return nil
		}
	}

	return fmt.Errorf("Key %s not found", keyName)
}
832374
func (tx *txn) Delete(key string) keyval.BytesTxn {
	tx.ops = append(tx.ops, &api.KVTxnOp{
		Verb: api.KVDelete,
		Key:  key,
	})
	return tx
}
819477
func (s *Section) RemoveKey(key string) {
	k, pos := s.getKey(key)
	if k != nil {
		s.file.lines = append(s.file.lines[:pos], s.file.lines[pos+1:]...)

		// find place in s.keys
		idx := 0
		for ; idx < len(s.keys); idx++ {
			if s.file.KeyCompFunc(key, s.keys[idx]) {
				break
			}
		}

		// remove from s.keys
		s.keys = append(s.keys[:idx], s.keys[idx+1:]...)
	}
}
1262908
func (kv *KV) Delete(key []byte) error {
	return kv.db.Delete(key, nil)
}
293310
func (mc *Connection) Delete(key string) (deleted bool, err error) {
	defer handleError(&err)
	mc.setDeadline()
	// delete <key> [<time>] [noreply]\r\n
	mc.writestrings("delete ", key, "\r\n")
	reply := mc.readline()
	if strings.Contains(reply, "ERROR") {
		panic(NewError("Server error"))
	}
	return strings.HasPrefix(reply, "DELETED"), nil
}