i'm trying to reload a plugin in Golang, i'm using Go 1.8. I try to open again the plugin but that didn't work(Open opens a Go plugin. If a path has already been opened, then the existing *Plugin is returned. It is safe for concurrent use by multiple goroutines. - Go Plugin open documentation). I want to know is any way to the reload without rerun the server?
As far as I know, It's impossible since go can't unload shared library. When created some objects in the plugin, and it's referenced from program, it can't do garbage collect. See this issue: https://github.com/golang/go/issues/11100