]> Cypherpunks repositories - gostls13.git/commit
container/heap: split example into two
authorCaleb Spare <cespare@gmail.com>
Thu, 31 Jan 2013 07:14:29 +0000 (23:14 -0800)
committerRuss Cox <rsc@golang.org>
Thu, 31 Jan 2013 07:14:29 +0000 (23:14 -0800)
commit0e74f04accf82abb075a4d7a908e0b726d9752dd
tree7b821c4a4b879725521be50156ffa63cc7c7c197
parentbd75468a089c8ad38bcb1130c4ed7d2703ef85c1
container/heap: split example into two

This adds a simple IntHeap example, and modifies the more complex
PriorityQueue example to make use of the index field it maintains.

Fixes #4331.

R=rsc, adg
CC=golang-dev
https://golang.org/cl/7068048
src/pkg/container/heap/example_intheap_test.go [new file with mode: 0644]
src/pkg/container/heap/example_pq_test.go [moved from src/pkg/container/heap/example_test.go with 50% similarity]
src/pkg/container/heap/heap.go