Commit 641c3226 authored by bontequero's avatar bontequero Committed by Brad Fitzpatrick

container/heap: fix comments style

Fixes golint warning about comment on exported function.

Change-Id: Ia6a910e2dca2cd31d8de64419e36add6191e804d
Reviewed-on: https://go-review.googlesource.com/105495Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent e21a749a
...@@ -18,7 +18,9 @@ package heap ...@@ -18,7 +18,9 @@ package heap
import "sort" import "sort"
// Any type that implements heap.Interface may be used as a // The Interface type describes the requirements
// for a type using the routines in this package.
// Any type that implements it may be used as a
// min-heap with the following invariants (established after // min-heap with the following invariants (established after
// Init has been called or if the data is empty or sorted): // Init has been called or if the data is empty or sorted):
// //
...@@ -33,11 +35,10 @@ type Interface interface { ...@@ -33,11 +35,10 @@ type Interface interface {
Pop() interface{} // remove and return element Len() - 1. Pop() interface{} // remove and return element Len() - 1.
} }
// A heap must be initialized before any of the heap operations // Init establishes the heap invariants required by the other routines in this package.
// can be used. Init is idempotent with respect to the heap invariants // Init is idempotent with respect to the heap invariants
// and may be called whenever the heap invariants may have been invalidated. // and may be called whenever the heap invariants may have been invalidated.
// Its complexity is O(n) where n = h.Len(). // Its complexity is O(n) where n = h.Len().
//
func Init(h Interface) { func Init(h Interface) {
// heapify // heapify
n := h.Len() n := h.Len()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment