Example StringSvc3 Has Endpoint Code Mismatch #772
Labels
Comments
|
I think that the rationnale is that, context is not needed in these examples, and it has been removed from the StringSvc1 example to avoid clutter and make it easier to understand. I'd be in favor of removing it in all the StringSvc since it's covered in the "Advanced topics" area on the same page. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the third section of the example stringsvc application the guide tells the user that the following snippet is the correct definition for a proxied version of the Uppercase service:
Since
mw.uppercasereturns an Endpoint and Endpoints must recieve two args this cannot be correct.Meanwhile, the code in GitHub has this definition:
The example code in the guide should likely include ctx as part of the
structand ctx should be included in the response variable creation.There was recently some work done to remove ctx from the earlier examples in stringsvc1. Perhaps there is already work being done in this area?
Sources:
http://gokit.io/examples/stringsvc.html#calling-other-services
https://github.com/go-kit/kit/blob/master/examples/stringsvc3/proxying.go#L69-L90
The text was updated successfully, but these errors were encountered: