// remove removes an item with the specified id from the list.
remove removes an item with the specified id from the list.
// remove removes an item with the specified id from the list .
func (ttl *TTL) remove(id ItemID) (item *Item, exists bool) {
	item, exists = ttl.ids[id]
	if !exists {
		return nil, false
	}
	delete(ttl.ids, item.id)
	if item.prev != nil {
		item.prev.next = item.next
	}
	if item.next != nil {
		item.next.prev = item.prev
	}
	if item == ttl.head {
		ttl.head = item.next
	}
	if item == ttl.tail {
		ttl.tail = item.prev
	}
	item.prev = nil
	item.next = nil
	return
}
func ( ttl * TTL ) remove ( id ItemID ) ( item * Item , exists bool ) { item , exists = ttl . ids [ id ] if ! exists { return nil , false } delete ( ttl . ids , item . id ) if item . prev != nil { item . prev . next = item . next } if item . next != nil { item . next . prev = item . prev } if item == ttl . head { ttl . head = item . next } if item == ttl . tail { ttl . tail = item . prev } item . prev = nil item . next = nil return }
remove removes an item with the specified id from the list.
remove removes an item with the specified id from the list .