heap.Interface assertion
Vladimir Bauer
3 years ago
| 0 | 0 |
package mpb
|
| 1 | 1 |
|
| 2 | |
// A priorityQueue implements heap.Interface
|
|
2 |
import "container/heap"
|
|
3 |
|
|
4 |
var _ heap.Interface = (*priorityQueue)(nil)
|
|
5 |
|
| 3 | 6 |
type priorityQueue []*Bar
|
| 4 | 7 |
|
| 5 | 8 |
func (pq priorityQueue) Len() int { return len(pq) }
|