turnpike
turnpike copied to clipboard
Service feature
Add Service feature similar to net/rpc registration of service methods.
Adds "github.com/mitchellh/mapstructure" as dependency.
I hope I did syncing dev with v2 correct. Looks funky with git rebase.
The comment for RegisterService
says that one of the requirements for a service method is "two arguments, both of exported type". What does that mean?
That line is wrong. I am sorry, I fixed it.
I run into a problem with mapstructure. You can't customize decoding of structs with methods. It requires hook functions which adds a lot of complexity to turnpike to enable customizing decoding. I prefer the way encoding/json works with methods on the types instead of hook functions. I would like to replace mapstructure with encoding/json.