Skip to content

Instantly share code, notes, and snippets.

@mrosset
Created March 14, 2011 01:49
Show Gist options
  • Select an option

  • Save mrosset/868652 to your computer and use it in GitHub Desktop.

Select an option

Save mrosset/868652 to your computer and use it in GitHub Desktop.
func (v *Oid) String() string {
p := C.git_oid_allocfmt(v.git_oid)
sha := C.GoString(p)
C.free(unsafe.Pointer(p))
return sha
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment