]> Cypherpunks repositories - gostls13.git/commit
container/heap: Simplify the example.
authorFrithjof Schulze <schulze@math.uni-hannover.de>
Tue, 4 Dec 2012 22:11:33 +0000 (14:11 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 4 Dec 2012 22:11:33 +0000 (14:11 -0800)
commitcfc0a59d6e4e11b08b7b7085e6da031643879b0a
tree0e75d8d4df31243bda55fcfa0d063fb3dcb9d76c
parent2cb715a8b378a89bcb558fac05dc1dfddb9bfc31
container/heap: Simplify the example.

Using append simplifies the code and makes it work if
the initial capacity of the slice is smaller than the
number of items pushed.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/6869060
src/pkg/container/heap/example_test.go