Go 的插件
plugins/hello-world),并按照以下格式编写 main.go: ```go// Always create a new binary package main
import "github.com/dullgiulio/pingo"
// Create an object to be exported type MyPlugin struct{}
// Exported method, with a RPC signature func (p *MyPlugin) SayHello(name string, msg *string) error { *msg = "Hello, " + name return nil }
func main() { plugin := &MyPlugin{}
// Register the objects to be exported
pingo.Register(plugin)
// Run the main events handler
pingo.Run()
}
然后编译它:sh
$ cd plugins/hello-world
$ go build
你应该得到一个名为
```hello-world```
的可执行文件。恭喜你,这就是你的插件。暂无开放 Issues,或尚未同步最近议题。