-
Notifications
You must be signed in to change notification settings - Fork 125
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
Refactor the client to supports the context versions methods #221
base: master
Are you sure you want to change the base?
Conversation
…e to `client_impl.go` file
if ctx != nil { | ||
req, err = http.NewRequestWithContext(ctx, method, targetUrl, bodyReader) | ||
} else { | ||
req, err = http.NewRequest(method, targetUrl, bodyReader) | ||
} |
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 the core refactor of how we supported the context methods, guys should keep in mind it when reviewing the other refactors
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.
The methods in this file were not taking any large refactoring, just moved from the client.go
to here, and support to passes the context.Context
arg of the methods
@git-hulk Just reminding you to not forget this PR. It's ok to take a review any time you free. |
Background
For go programming,
context
is an approach to enable the callers to interpret the process positively.However, The LMSTFY client just doesn't support it, So the PR tries to provide many new methods and support to pass the context into the client implementation process.