step reads the next entry from ch and saves it in ch.e. It returns false if ch is over.
(ch *postChunk)
| 351 | // step reads the next entry from ch and saves it in ch.e. |
| 352 | // It returns false if ch is over. |
| 353 | func (h *postHeap) step(ch *postChunk) bool { |
| 354 | old := ch.e |
| 355 | m := ch.m |
| 356 | if len(m) == 0 { |
| 357 | return false |
| 358 | } |
| 359 | ch.e = postEntry(m[0]) |
| 360 | m = m[1:] |
| 361 | ch.m = m |
| 362 | if old >= ch.e { |
| 363 | panic("bad sort") |
| 364 | } |
| 365 | return true |
| 366 | } |
| 367 | |
| 368 | // add adds the chunk to the postHeap. |
| 369 | // All adds must be called before the first call to next. |
nothing calls this directly
no test coverage detected