// DeletePaste deletes a paste, which is referenced by the paste_key.
334071
func (pb *Pastebin) DeletePaste(apiPasteKey string) (err error) {
	qryOptions := url.Values{}
	qryOptions.Set("api_paste_key", apiPasteKey)
	qryOptions.Set("api_user_key", pb.apiUserKey)
	qryOptions.Set("api_dev_key", pb.apiDevKey)
	qryOptions.Set("api_option", "delete")

	resp, err := http.PostForm(postURL, qryOptions)

	if err != nil {
		return err
	}

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return err
	}

	if string(body) != "Paste Removed" {
		return errors.New(string(body))
	}
	return nil
}
12551
func (c *InMemoryCache) Delete(_ context.Context, key Key) bool {
	if _, found := c.items.Load(key.String()); found {
		c.items.Delete(key.String())
		return true
	}
	return false
}
197273
func (batch *UpdateBatch) Delete(key []byte) {
	batch.KVs[string(key)] = nil
}
136646
func (c *CMap) Delete(key interface{}) {
	c.mutex.Lock()
	delete(c.items, key)
	c.mutex.Unlock()
}
1121638
func (c *Cache) Delete(host string) {
	c.Lock()
	defer c.Unlock()
	delete(c.Clients, host)
}
819445
func (c *Cache) Delete(key string) {
	c.db.Delete([]byte(key), nil)
}
793412
func (m *Mux) Delete(pattern string, handler http.HandlerFunc) {
	m.Handle(http.MethodDelete, pattern, handler)
}
1152588
func (k *KeyValueStringSlice) Delete(key string) {
	for i := 0; i < len(k.Keys); i++ {
		if k.Keys[i] == key {
			k.Keys = k.deleteIndex(i, k.Keys)
			k.Values = k.deleteIndex(i, k.Values)
		}
	}
}
130687
func (c *LruCache) Delete(key string) {
	c.mu.Lock()

	if le, ok := c.cache[key]; ok {
		c.deleteElement(le)
	}

	c.mu.Unlock()
}
1116684
func Delete(key string) error {
	err := Client().Delete(key)
	Trace("Delete", err, logrus.Fields{fieldKey: key})
	return err
}
1258209
func (pb *Pastebin) Paste(apiPasteCode, apiPasteName, apiPasteFormat, apiPasteExpire, apiPastePrivate string) (pasteURL *url.URL, err error) {
	pasteOptions := url.Values{}

	pasteOptions.Set("api_dev_key", pb.apiDevKey)
	pasteOptions.Set("api_option", "paste")
	pasteOptions.Set("api_paste_code", apiPasteCode)
	pasteOptions.Set("api_paste_name", apiPasteName)
	pasteOptions.Set("api_paste_format", apiPasteFormat)
	pasteOptions.Set("api_paste_expire_date", apiPasteExpire)
	pasteOptions.Set("api_paste_private", apiPastePrivate)
	pasteOptions.Set("api_user_key", pb.apiUserKey)

	return pasteRequest(postURL, pasteOptions)
}
948076
func (t *Table) Delete(columns ...string) (stmt string, names []string) {
	return qb.Delete(t.metadata.Name).Columns(columns...).Where(t.primaryKeyCmp...).ToCql()
}
793364
func (m *clientConnMap) Delete(dest string) {
	m.Lock()

	if conn, ok := m.conns[dest]; ok {
		_ = conn.Close()
	}
	delete(m.conns, dest)

	m.Unlock()
}
1180109
func (fi *FastIntegerHashMap) Delete(key uint64) {
	if fi.packets.delete(key) {
		fi.count--
	}
}
409697
func (ng *etcdv2AutoCertCache) Delete(ctx context.Context, rawKey string) error {
	key := ng.normalized(rawKey)
	_, err := ng.kapi.Delete(ctx, key, &etcd.DeleteOptions{})
	return err
}
652111
func GMapDelete(key string) interface{} {
	gmap.lock.Lock()
	defer gmap.lock.Unlock()

	if !checkGMap(false) {
		return nil
	}

	v := gmap.gm[key]
	delete(gmap.gm, key)

	if len(gmap.gm) == 0 {
		deleteGMap()
	}

	return v
}
421008
func (c *MemoryStore) DeleteMap(key string, fields ...string) error {
	m, err := c.GetMap(key)
	if err != nil {
		return err
	}

	for _, field := range fields {
		delete(m, field)
	}

	return c.SetMap(key, m)
}