Get retrieves the pointer from the given handle
(handle unsafe.Pointer)
| 56 | |
| 57 | // Get retrieves the pointer from the given handle |
| 58 | func (v *HandleList) Get(handle unsafe.Pointer) interface{} { |
| 59 | v.RLock() |
| 60 | defer v.RUnlock() |
| 61 | |
| 62 | ptr, ok := v.handles[handle] |
| 63 | if !ok { |
| 64 | panic(fmt.Sprintf("invalid pointer handle: %p", handle)) |
| 65 | } |
| 66 | |
| 67 | return ptr |
| 68 | } |
no outgoing calls
no test coverage detected