Does this issue reproduce with the latest release?
syscall.NewCallback (and syscall.NewCallbackCDecl) don't describe what's expected of the type of their argument beyond "it must be a function". But they do have requirements. For example, if you pass a function with no argument and no results, they panic with "compileCallback: function must have one output parameter". I don't actually know what this means a priori, and the NewCallback documentation doesn't tell me. The term "output parameter" doesn't appear in the Go spec, and it could (and does in this case) mean a result value, or it could mean a C-style output parameter which is actually an input argument that points to where to put the result.
We should document NewCallback*'s requirements and clarify the panic message for when they're violated.