Minimal example of using go 1.8 plugins with init registration.
First, build the plugin:
$ go build -buildmode=plugin -o plugin1.so ./plugin1
Then, build plugger
:
$ go build ./cmd/plugger
These don't need to be done in a particular order. Now, we can run plugger:
$ ./plugger plugin1
Let's build the other plugin:
$ go build -buildmode=plugin -o plugin2.so ./plugin2
Now, we can run that one as well:
$ ./plugger plugin2