// Delete a sub from a given list.
172152
func (sub *subState) deleteFromList(sl []*subState) ([]*subState, bool) {
	for i := 0; i < len(sl); i++ {
		if sl[i] == sub {
			sl[i] = sl[len(sl)-1]
			sl[len(sl)-1] = nil
			sl = sl[:len(sl)-1]
			return shrinkSubListIfNeeded(sl), true
		}
	}
	return sl, false
}
978558
func (s *SkipList) Delete(key interface{}) (value interface{}, ok bool) {
	if key == nil {
		panic("goskiplist: nil keys are not supported")
	}
	update := make([]*node, s.level()+1, s.effectiveMaxLevel())
	candidate := s.getPath(s.header, update, key)

	if candidate == nil || candidate.key != key {
		return nil, false
	}

	previous := candidate.backward
	if s.footer == candidate {
		s.footer = previous
	}

	next := candidate.next()
	if next != nil {
		next.backward = previous
	}

	for i := 0; i <= s.level() && update[i].forward[i] == candidate; i++ {
		update[i].forward[i] = candidate.forward[i]
	}

	for s.level() > 0 && s.header.forward[s.level()] == nil {
		s.header.forward = s.header.forward[:s.level()]
	}
	s.length--

	return candidate.value, true
}
339940
func (s *SecondaryCache) Delete(secondary string) bool {
	item := s.bucket.delete(secondary)
	if item != nil {
		s.pCache.deletables <- item
		return true
	}
	return false
}
289024
func (gss *genericSubStore) DeleteSub(subid uint64) error {
	gss.Lock()
	delete(gss.subs, subid)
	gss.Unlock()
	return nil
}
410865
func (c *MemoryCacher) Delete(key string) error {
	c.lock.Lock()
	defer c.lock.Unlock()

	delete(c.items, key)
	return nil
}
187013
func (list *SkipList) Remove(key interface{}) *Element {
	score := getScore(key, list.reversed)
	prevs := list.getPrevElementNodes(key, score)

	// found the element, remove it
	if element := prevs[0].next[0]; element != nil && !list.keyFunc.Compare(element.key, key) {
		for k, v := range element.next {
			prevs[k].next[k] = v
		}

		list.length--
		return element
	}

	return nil
}
877829
func (c *Client) Close() error {
	for _, s := range c.subs {
		s.Unsubscribe()
	}
	return nil
}
459010
func (s *stringSet) Remove(vs ...string) {
	for _, v := range vs {
		delete(s.values, v)
	}
}
1361388
func (item *Item) Delete() error {
  var prompt dbus.ObjectPath

  err := item.dbus.Call("org.freedesktop.Secret.Item.Delete", 0).Store(&prompt)
  if err != nil {
    return err
  }

  if isPrompt(prompt) {
    prompt := NewPrompt(item.conn, prompt)
    if _, err := prompt.Prompt(); err != nil {
      return err
    }
  }

  return nil
}
771802
func (s *awsService) Delete(ctx context.Context, groupID string) error {
	input := &aws.DeleteGroupInput{
		GroupID: fi.String(groupID),
	}

	_, err := s.svc.Delete(ctx, input)
	return err
}
20536
func (l *LRUNoTS) Delete(key string) error {
	res, err := l.cache.Get(key)
	if err != nil && err != ErrNotFound {
		return err
	}

	// item already deleted
	if err == ErrNotFound {
		// surpress not found errors
		return nil
	}

	elem := res.(*list.Element)

	return l.removeElem(elem)
}
143709
func (l *list) Remove(e *element) interface{} {
	if e.list == l {
		// if e.list == l, l must have been initialized when e was inserted
		// in l or l == nil (e is a zero Element) and l.remove will crash
		l.remove(e)
	}
	return e.Value
}
812288
func (s Set) Delete(els ...string) Set {
	if s == nil {
		return s
	}

	for _, el := range els {
		delete(s, el)
	}

	return s
}
530954
func (l *List) Remove(e *Element) interface{} {
	if e.list == l {
		// if e.list == l, l must have been initialized when e was inserted
		// in l or l == nil (e is a zero Element) and l.remove will crash
		l.remove(e)
	}
	return e.Value
}
1209591
func (vs *ValueMap) Delete(k Value) {
	if vs == nil {
		return
	}
	vs.hashMap.Delete(k)
}
370184
func remove(strs []string, s string) []string {
	for i, v := range strs {
		if s == v {
			strs[i] = strs[len(strs)-1]
			return strs[:len(strs)-1]
		}
	}
	return strs
}
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
}