func (v *HandleList) Get(handle unsafe.Pointer) interface{} {
	v.RLock()
	defer v.RUnlock()
	ptr, ok := v.handles[handle]
	if !ok {
		panic(fmt.Sprintf("invalid pointer handle: %p", handle))
	}
	return ptr
}
Get retrieves the pointer from the given handle
package git
import "C"
import (
	"fmt"
	"sync"
	"unsafe"
)
type HandleList struct {
	sync.RWMutex
	handles map[unsafe.Pointer]interface{}
}
func NewHandleList() *HandleList {
	return &HandleList{
		handles: make(map[unsafe.Pointer]interface{}),
	}
}
func (v *HandleList) Track(pointer interface{}) unsafe.Pointer {
	handle := C.malloc(1)
	v.Lock()
	v.handles[handle] = pointer
	v.Unlock()
	return handle
}
func (v *HandleList) Untrack(handle unsafe.Pointer) {
	v.Lock()
	delete(v.handles, handle)
	C.free(handle)
	v.Unlock()
}