I have a go package foo, it is in $GOPATH/src/github.com/org/foo/
And I want to build a static library for C code to consume the Go library.
But in order to do so, the cgo wrapper wrapper.go file needs to be using
package main(see https://golang.org/cmd/go/#hdr-Description_of_build_modes ,
"
Just to want let people who reached this post (#1 search result) know (like
me), I think this problem has been addressed (since 2015 I think), more
documentation
here:
https://github.com/golang/go/blob/c20e54533ea49ca68640d9a59c9ed935b27da8e5/src/cmd/go/internal/load/pkg.go#L1183
Helin
On Sun