<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions --> ### What version of Go are you using (`go version`)? <pre> $ go version go1.15.2 </pre> ### Does this issue reproduce with the latest release? ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOOS="darw" </pre></details> ### What did you do? package main import "C" //export Sum func Sum(a, b int) int { return a + b } func main() { // We need the main function to make possible // CGO compiler to compile the package as C shared library } <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. --> ### What did you expect to see? I want to expose the Sum function which accepts arguments in order to use it in a non browser environment. Currently there is no way to do that mucous only main() is exposed. ### What did you see instead?