Skip to content
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

Create request package #18

Merged
merged 4 commits into from
Dec 10, 2019
Merged

Create request package #18

merged 4 commits into from
Dec 10, 2019

Conversation

victormn
Copy link
Contributor

@victormn victormn commented Dec 9, 2019

This is a initial package to put and get a string (Request ID) in context.
The request ID always will be created when the method WithRequestID is
used.

//(...)
RequestID request.ID
}
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why recommend the Request ID be passed by struct if you added the GetRequestIDFromContext? This could be the standard way to manipulate Request IDs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you are encoding the response, you don't have the service's context, only the service response. Could be used in "BaseEndpointResponse", but this project don't have a standard API base response (yet)

request/context_test.go Outdated Show resolved Hide resolved
request/requestid.go Outdated Show resolved Hide resolved
request/requestid_test.go Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
This is a initial package to put and get a string (Request ID) in context.
The request ID always will be created when the method WithRequestID is
used.
@victormn
Copy link
Contributor Author

victormn commented Dec 9, 2019

PR updated

request/requestid.go Outdated Show resolved Hide resolved
request/requestid_test.go Outdated Show resolved Hide resolved
request/requestid.go Outdated Show resolved Hide resolved
request/requestid.go Outdated Show resolved Hide resolved
Rename files;

Create "request.IsEmpty";

Returns empty string when request is empty, in method String()
@victormn
Copy link
Contributor Author

victormn commented Dec 9, 2019

@rjfonseca updated

@rjfonseca rjfonseca merged commit 564a0ba into master Dec 10, 2019
@rjfonseca rjfonseca deleted the feature/requestid branch December 10, 2019 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants