package fix import "unsafe" import "C" import "log" //export message_callback_go func message_callback_go(pfunc unsafe.Pointer, trade unsafe.Pointer, msg unsafe.Pointer, sid unsafe.Pointer) { if msg == nil { f := *(*func (unsafe.Pointer, unsafe.Pointer))(pfunc) log.Println(trade, sid, msg, f) f(trade, sid) } else { f := *(*func (unsafe.Pointer, unsafe.Pointer, unsafe.Pointer))(pfunc) log.Println(trade, sid, msg, f) f(trade, msg, sid) } }