From ff3063daeae70e7319959b98edeb4c5482076534 Mon Sep 17 00:00:00 2001 From: Andras Banki-Horvath Date: Fri, 22 Nov 2019 16:08:56 +0100 Subject: [PATCH] queue: fixing doc after cherry pick This commit just fixes a godoc and adds a new one to the already merged queue.PriorityQueue. --- queue/priority_queue.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/queue/priority_queue.go b/queue/priority_queue.go index aae7b423..06485e53 100644 --- a/queue/priority_queue.go +++ b/queue/priority_queue.go @@ -9,6 +9,8 @@ import ( // PriorityQueue will be able to use that to build and restore an underlying // heap. type PriorityQueueItem interface { + // Less must return true if this item is ordered before other and false + // otherwise. Less(other PriorityQueueItem) bool } @@ -43,7 +45,7 @@ func (pq *priorityQueue) Pop() interface{} { return item } -// Priority wrap a standard heap in a more object-oriented structure. +// PriorityQueue wraps a standard heap into a self contained class. type PriorityQueue struct { queue priorityQueue }