Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevvooe/plugtest
Minimal example of using go 1.8 plugins with init registration.
https://github.com/stevvooe/plugtest
go plugins
Last synced: 2 months ago
JSON representation
Minimal example of using go 1.8 plugins with init registration.
- Host: GitHub
- URL: https://github.com/stevvooe/plugtest
- Owner: stevvooe
- License: apache-2.0
- Created: 2017-02-16T23:04:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T23:13:37.000Z (almost 8 years ago)
- Last Synced: 2024-11-14T00:35:21.584Z (3 months ago)
- Topics: go, plugins
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - plugtest
README
# plugtest
Minimal example of using go 1.8 plugins with init registration.
# Usage
First, build the plugin:
```console
$ go build -buildmode=plugin -o plugin1.so ./plugin1
```Then, build `plugger`:
```console
$ go build ./cmd/plugger
```These don't need to be done in a particular order. Now, we can run plugger:
```console
$ ./plugger plugin1
```Let's build the other plugin:
```console
$ go build -buildmode=plugin -o plugin2.so ./plugin2
```Now, we can run that one as well:
```console
$ ./plugger plugin2
```