Skip to content

Instantly share code, notes, and snippets.

@napsy
Created August 29, 2010 15:10
Show Gist options
  • Save napsy/556363 to your computer and use it in GitHub Desktop.
Save napsy/556363 to your computer and use it in GitHub Desktop.
/*
Parse() calls uuid_unparse() which takes unsigned char * as arg1 and char * as arg2
-- parses the first argument and writes a string representation in the second argument (37 bytes)
*/
func Parse(_uuid []byte) string {
var _str []byte = make([]byte, 37)
C.uuid_unparse((*C.uchar)(unsafe.Pointer(&_uuid)), (*C.char)(unsafe.Pointer(&_str)))
return string(_str)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment