Beispiel #1
0
func (o Oid) String() string {
	if o.oid == nil {
		return "(invalid)"
	}
	ptr := C.git_oid_allocfmt(o.oid)
	defer C.free(unsafe.Pointer(ptr))
	return C.GoString(ptr)
}
Beispiel #2
0
func oidToString(oid *C.git_oid) string {
	id := C.git_oid_allocfmt(oid)
	defer C.free(unsafe.Pointer(id))
	return C.GoString(id)
}
Beispiel #3
0
func (v *Oid) String() string {
	p := C.git_oid_allocfmt(v.git_oid)
	sha1 := C.GoString(p)
	C.free(unsafe.Pointer(p))
	return sha1
}