Beispiel #1
0
func main() {
	p := C.CString("From Golang")
	defer C.free(unsafe.Pointer(p)) //have to free memory manually
	C.my_puts(p)
}
Beispiel #2
0
func main() {
	p := C.CString("Golang is awsome")
	defer C.free(unsafe.Pointer(p))
	C.my_puts(p)
}