remove removes key from the container.
(key uint16)
| 1326 | |
| 1327 | // remove removes key from the container. |
| 1328 | func (rc *runContainer16) removeKey(key uint16) (wasPresent bool) { |
| 1329 | var index int |
| 1330 | index, wasPresent, _ = rc.search(int(key)) |
| 1331 | if !wasPresent { |
| 1332 | return // already removed, nothing to do. |
| 1333 | } |
| 1334 | pos := key - rc.iv[index].start |
| 1335 | rc.deleteAt(&index, &pos) |
| 1336 | return |
| 1337 | } |
| 1338 | |
| 1339 | // internal helper functions |
| 1340 |