[Go] Add context to all requests for tracing, logging, cancellations, etc.#6997
Merged
wing328 merged 2 commits intoswagger-api:masterfrom Nov 29, 2017
Merged
[Go] Add context to all requests for tracing, logging, cancellations, etc.#6997wing328 merged 2 commits intoswagger-api:masterfrom
wing328 merged 2 commits intoswagger-api:masterfrom
Conversation
wing328
reviewed
Nov 27, 2017
| * @param ctx context.Context for authentication, logging, tracing, etc. | ||
| @return */ | ||
| func (a *UserApiService) LogoutUser() ( *http.Response, error) { | ||
| func (a *UserApiService) LogoutUser(ctx context.Context, ) ( *http.Response, error) { |
Contributor
There was a problem hiding this comment.
@antihax I think there's a way to remove the trailing comma when the endpoint does not require any parameter. Let me know if you need help on this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.3.0.0branch for changes related to OpenAPI spec 3.0. Default:master.Addition of Context to all requests
Added context.Context to all requests and tied to the request to be utilized for cancellations, deadlines, logging, tracing, as well as authentication or other value transfer.
Converted to text context keys. int will cause a linter warning.