ListKeys returns a list of all the keys of the objects currently in the Heap.
()
| 269 | |
| 270 | // ListKeys returns a list of all the keys of the objects currently in the Heap. |
| 271 | func (h *Heap) ListKeys() []string { |
| 272 | h.lock.RLock() |
| 273 | defer h.lock.RUnlock() |
| 274 | list := make([]string, 0, len(h.data.items)) |
| 275 | for key := range h.data.items { |
| 276 | list = append(list, key) |
| 277 | } |
| 278 | return list |
| 279 | } |
| 280 | |
| 281 | // Get returns the requested item, or sets exists=false. |
| 282 | func (h *Heap) Get(obj interface{}) (interface{}, bool, error) { |
no outgoing calls