    item := old[n-1]
    item.index = -1 <span class="com">// for safety</span>
    *pq = old[0 : n-1]
    return item
}
<span class="com">// update modifies the priority and value of an Item in the queue.</span>
func (pq *PriorityQueue) update(item *Item, value string, priority int) {
    item.value = value
    item.priority = priority
    heap.Fix(pq, item.index)
}
<span class="com">// This example creates a PriorityQueue with some items, adds and manipulates an item,</span>
<span class="com">// and then 