-
-
Notifications
You must be signed in to change notification settings - Fork 120
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 Doer interface and setter #21
Conversation
// Sling is an HTTP Request builder and sender. | ||
type Sling struct { | ||
// http Client for doing requests | ||
httpClient *http.Client | ||
doer Doer |
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.
let's just keep the unexported variable called httpClient
or client
since that still reflects its purpose when reading through
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! Can you split out the indent feature into a separate PR and remove the merge commit please? |
address #15
Sorry, I meant to clean up the history. Not sure how that merge commit crept in there. This PR now just contains the doer change. |
There are some comments on the outdated diffs as well. |
I didn't understand the comment "apply this change in the previous commit". Maybe this doesn't apply since the commit history was revised? |
Squashed and merged as 4b482f9 |
Replaced use of *http.Client with interface Doer. Allows use of client-side middleware by wrapping *http.Client before passing to Sling.