(x interface{})
| 284 | func (h resultHeap) Less(i, j int) bool { return h[i].Score < h[j].Score } |
| 285 | func (h resultHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } |
| 286 | func (h *resultHeap) Push(x interface{}) { |
| 287 | r, ok := x.(Result) |
| 288 | if ok { |
| 289 | *h = append(*h, r) |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | func (h *resultHeap) Pop() interface{} { |
| 294 | old := *h |