code: func (h *Heap) Add(obj interface{}) error {
  	key, err := h.data.keyFunc(obj)
  	if err != nil {
  		return KeyError{obj, err}
  	}
  	h.lock.Lock()
  	defer h.lock.Unlock()
  	if h.closed {
  		return fmt.Errorf(closedMsg)
  	}
  	if _, exists := h.data.items[key]; exists {
  		h.data.items[key].obj = obj
  		heap.Fix(h.data, h.data.items[key].index)
  	} else {
  		h.addIfNotPresentLocked(key, obj)
  	}
  	h.cond.Broadcast()
  	return nil
  }
docs: // Add inserts an item, and puts it in the queue. The item is updated if it
  // already exists.