Skip to content

Commit 641c322

Browse files
bontequerobradfitz
bontequero
authored andcommitted
container/heap: fix comments style
Fixes golint warning about comment on exported function. Change-Id: Ia6a910e2dca2cd31d8de64419e36add6191e804d Reviewed-on: https://go-review.googlesource.com/105495 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent e21a749 commit 641c322

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/container/heap/heap.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ package heap
1818

1919
import "sort"
2020

21-
// Any type that implements heap.Interface may be used as a
21+
// The Interface type describes the requirements
22+
// for a type using the routines in this package.
23+
// Any type that implements it may be used as a
2224
// min-heap with the following invariants (established after
2325
// Init has been called or if the data is empty or sorted):
2426
//
@@ -33,11 +35,10 @@ type Interface interface {
3335
Pop() interface{} // remove and return element Len() - 1.
3436
}
3537

36-
// A heap must be initialized before any of the heap operations
37-
// can be used. Init is idempotent with respect to the heap invariants
38+
// Init establishes the heap invariants required by the other routines in this package.
39+
// Init is idempotent with respect to the heap invariants
3840
// and may be called whenever the heap invariants may have been invalidated.
3941
// Its complexity is O(n) where n = h.Len().
40-
//
4142
func Init(h Interface) {
4243
// heapify
4344
n := h.Len()

0 commit comments

Comments
 (0)