//Remove deletes the association stored at key if one exists.
//v is the removed value or nil if nothing was returned, and ok indicated any value
//was actually removed.
542776
func (v *Values) Remove(key Key) (value interface{}, ok bool) {
	v.lock.Lock()
	defer v.lock.Unlock()

	if key.IsEmpty() {
		if v.root.isSet() {
			result := v.root.value
			v.root = newNode()
			return result, true
		}
		return nil, false
	}

	parent, found, _ := v.root.findDescendent(nil, key, false, false)
	if found == nil {
		return nil, false
	}
	var result interface{}
	if found.isSet() {
		result = found.value
	} else {
		result = newValues(found)
	}
	if parent != nil {
		delete(parent.children, key[key.Len()-1])
	}
	return result, true
}
1055372
func (r *MemoryNoTS) Delete(key string) error {
	delete(r.items, key)
	return nil
}
491895
func (kv *KeyValue) Remove() error {
	err := (*bbolt.DB)(kv.db).Update(func(tx *bbolt.Tx) error {
		return tx.DeleteBucket(kv.name)
	})
	// Mark as removed by setting the name to nil
	kv.name = nil
	return err
}
600714
func (deque *keyedDeque) Remove(e *list.Element) (v interface{}) {
	deque.RLock()
	key, ok := deque.invertedIndex[e]
	deque.RUnlock()

	if ok {
		v = deque.Delete(key)
	}

	return
}
497851
func (c *Container) remove(v uint16) (removed bool) {
	if c.isArray() {
		removed = c.arrayRemove(v)
	} else if c.isRun() {
		removed = c.runRemove(v)
	} else {
		removed = c.bitmapRemove(v)
	}
	return removed
}
102972
func (t *PairTree) Remove(ptr string) *Pair {
	v := t.ObjectTree.Remove(Pair{ptr, nil})
	if v != nil {
		x := v.(Pair)
		return &x
	}
	return nil
}
1058579
func (c Collector) Remove(k string) {
	if c.Has(k) {
		delete(c, k)
	}
}
523294
func (s *set) Remove(vs ...interface{}) {
	for _, v := range vs {
		delete(s.values, v)
	}
}
818721
func (r *ring) remove(key []byte) {
	r.getPartition(key).remove(key)
	if r.keysHint > 0 {
		atomic.AddInt64(&r.keysHint, -1)
	}
}
471874
func (d *StateDir) Remove() error {
	if err := os.Remove(d.path); err != nil && !os.IsNotExist(err) {
		return err
	}
	// If atomic delete succeeded, update own state.
	d.state.Members = nil
	return nil
}
1217651
func (d *MapDatastore) Delete(key Key) (err error) {
	if _, found := d.values[key]; !found {
		return ErrNotFound
	}
	delete(d.values, key)
	return nil
}
416724
func (s *storeImpl) Delete(key string) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	delete(s.objects, key)
}
530682
func (c *Config) Remove(key string) (value interface{}, ok bool) {
	return c.values.Remove(c.NewKey(key))
}
55458
func (s *Session) Remove(ctx context.Context, key string) {
	sd := s.getSessionDataFromContext(ctx)

	sd.mu.Lock()
	defer sd.mu.Unlock()

	_, exists := sd.Values[key]
	if !exists {
		return
	}

	delete(sd.Values, key)
	sd.status = Modified
}
631923
func (b *FugaJSONBuilder) Remove(info *FugaPropertyInfo) *FugaJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
1068902
func (r *Repo) Remove(ctx context.Context, id uuid.UUID) error {
	r.RemoveCalled = true
	if r.SaveErr != nil {
		return r.SaveErr
	}
	r.Entity = nil
	return nil
}
1008306
func (t *transformer) remove(key string) bool {
	t.mut.Lock()
	defer t.mut.Unlock()
	if _, found := t.cache[key]; found {
		delete(t.cache, key)
		return true
	}
	return false
}