I've been experimenting with cgo these days to avoid writing C code. I have some shared libraries from C which I want to use in the go programs. So I was trying the passing pointer to C function from Go and got a panic! So let the code do the talking below is the code I used.
#ifndef __POINTER_H__
#define __POINTER_H__