-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rest client middleware with unit tests #73
Add Rest client middleware with unit tests #73
Conversation
RavenNumber of Findings: 0 |
@@ -33,10 +34,45 @@ const ( | |||
httpPut = "PUT" | |||
) | |||
|
|||
type InvocationHandler func(c *http.Client, method, url string, body interface{}, header http.Header) (*Response, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring
Could use some docstrings but otherwise lgtm. |
@@ -34,10 +34,13 @@ const ( | |||
httpPut = "PUT" | |||
) | |||
|
|||
// The type that is the function that is to be wrapped by the ClientMiddleware | |||
type InvocationHandler func(c *http.Client, method, url string, body interface{}, header http.Header) (*Response, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nit, but Go docstrings should start with the name of the type/function/struct/etc. https://blog.golang.org/godoc-documenting-go-code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the link, I've updated the docstrings and will try and keep it in mind for future use.
+1 looks great |
+1 |
1 similar comment
+1 |
RM +1 verified dependencies manually |
QA review can be found here: https://jira.atl.workiva.net/browse/RM-16257 |
r: @tylertreat-wf
o: @macleodbroad-wf @beaulyddon-wf @joestrach-wf