// Delete deletes the key matched by account if the passphrase is correct.
// If the account contains no filename, the address must match a unique key.
438552
func (ks *KeyStore) Delete(a accounts.Account, passphrase string) error {
	// Decrypting the key isn't really necessary, but we do
	// it anyway to check the password and zero out the key
	// immediately afterwards.
	a, key, err := ks.getDecryptedKey(a, passphrase)
	if key != nil {
		zeroKey(key.PrivateKey)
	}
	if err != nil {
		return err
	}
	// The order is crucial here. The key is dropped from the
	// cache after the file is gone so that a reload happening in
	// between won't insert it into the cache again.
	err = os.Remove(a.URL.Path)
	if err == nil {
		ks.cache.delete(a)
		ks.refreshWallets()
	}
	return err
}
587745
func (c *Client) Delete(key string) error {
	return c.deleteRecurse(key, false)
}
950347
func (entries *Entries) delete(key uint64) Entry {
	i := entries.search(key)
	if i == len(*entries) { // key not found
		return nil
	}

	if (*entries)[i].Key() != key {
		return nil
	}

	oldEntry := (*entries)[i]
	copy((*entries)[i:], (*entries)[i+1:])
	(*entries)[len(*entries)-1] = nil // GC
	*entries = (*entries)[:len(*entries)-1]
	return oldEntry
}
879085
func (c *MysqlCacher) Delete(key string) error {
	_, err := c.c.Exec("DELETE FROM cache WHERE `key`=?", c.md5(key))
	return err
}
557672
func (c *Client) Delete(key string) error {
	return c.withKeyRw(key, func(rw *bufio.ReadWriter) error {
		return writeExpectf(rw, resultDeleted, "delete %s\r\n", key)
	})
}
727096
func Delete(id int) error {
	for k, v := range accounts {
		if id == v.ID {
			accounts = append(accounts[:k], accounts[k+1:]...)
			return nil
		}
	}
	return fmt.Errorf("account id=%d is not found", id)
}
695975
func (c *NodbCacher) Delete(key string) error {
	_, err := c.db.Del([]byte(key))
	return err
}
314517
func (b *BoltKeyspace) Delete(key string) error {
    return b.db.Update(func(tx *bolt.Tx) error {
        b := tx.Bucket([]byte(b.name))
        return b.Delete([]byte(key))
    })
}
1333294
func (ac *accountCache) delete(removed accounts.Account) {
	ac.mu.Lock()
	defer ac.mu.Unlock()

	ac.all = removeAccount(ac.all, removed)
	if ba := removeAccount(ac.byAddr[removed.Address], removed); len(ba) == 0 {
		delete(ac.byAddr, removed.Address)
	} else {
		ac.byAddr[removed.Address] = ba
	}
}
157500
func (s *RateLimitedStorage) Delete(key interface{}) error {
	s.wait()
	defer s.signal()

	return s.storage.Delete(key)
}
416724
func (s *storeImpl) Delete(key string) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	delete(s.objects, key)
}
287194
func (c *Cache) Delete(key string) {
	c.Client.Delete(cacheKey(key))
}
21837
func (tx *Tx) Delete(key []byte) error {
	if tx.cellar == nil {
		return ErrTxClosed
	} else if !tx.writable {
		return ErrTxNotWritable
	}
	return tx.segmentBuilder.Delete(key)
}
477576
func (secrets *Secrets) Delete(key string) (rls *rspb.Release, err error) {
	// fetch the release to check existence
	if rls, err = secrets.Get(key); err != nil {
		if apierrors.IsNotFound(err) {
			return nil, storageerrors.ErrReleaseExists(rls.Name)
		}

		secrets.Log("delete: failed to get release %q: %s", key, err)
		return nil, err
	}
	// delete the release
	if err = secrets.impl.Delete(key, &metav1.DeleteOptions{}); err != nil {
		return rls, err
	}
	return rls, nil
}
1015573
func (f *FileStore) Delete(keys [][]byte) error {
	return f.DeleteRange(keys, math.MinInt64, math.MaxInt64)
}
1018399
func (c *Cache) Delete(keys [][]byte) {
	c.DeleteRange(keys, math.MinInt64, math.MaxInt64)
}
423775
func (ng *etcdv3AutoCertCache) Delete(ctx context.Context, rawKey string) error {
	key := ng.normalize(rawKey)
	_, err := ng.client.Delete(ctx, key)
	return err
}