You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What operating system and processor architecture are you using (go env)?
Ubuntu 14.04
Currently, the plugin package requires that code be in package main. It would be convenient if plugins could be built from any existing package. This would allow a package to be statically linked in the usual way or built as a plugin in a shared library. To do this now, a separate directory needs to be created with a .go file in package main that imports the package to be built as a plugin.
In this discussion, on golang-nuts, @ianlancetaylor suggested that it might be possible by giving a list of packages to the go tool that should be included in the plugin and then the go tool could generate the main package that imports the specified packages.
The text was updated successfully, but these errors were encountered:
Let's keep the conversation on #18124. @dgnorton's suggestion is already considered over there and non-main symbols not being exported for the plugin buildmode seems to be a blocker.
What version of Go are you using (
go version
)?1.8 beta 2
What operating system and processor architecture are you using (
go env
)?Ubuntu 14.04
Currently, the
plugin
package requires that code be inpackage main
. It would be convenient if plugins could be built from any existing package. This would allow a package to be statically linked in the usual way or built as a plugin in a shared library. To do this now, a separate directory needs to be created with a.go
file inpackage main
that imports the package to be built as a plugin.In this discussion, on golang-nuts, @ianlancetaylor suggested that it might be possible by giving a list of packages to the go tool that should be included in the plugin and then the go tool could generate the main package that imports the specified packages.
The text was updated successfully, but these errors were encountered: