pingo
pingo copied to clipboard
Abandon additional transport method parameter
Most of the time, users won't care what is the underlaying communication protocol. So, I propose:
func NewPlugin(path string, params ...string) *Plugin
To change the default communication protocol, expose:
func SetProto(proto string)
The API becomes clearer. E.g.:
p := pingo.NewPlugin("plugins/hello-world/hello-world")
Agreed. This would also help implementing automatic switching of protocol.
Would be nice to use RPC over stdin/stdout too.
@kdar: I'll make a new issue for this.