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

feat: add GetRequestIDFromContext #3

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

ThisIsAreku
Copy link
Contributor

Hello !
I added a function to get the request ID from the context directly.

Currently I'm using this workaround:

fakeRequest := (&http.Request{}).WithContext(ctx)
sloghttp.GetRequestID(fakeRequest)

GetRequestIDFromContext makes it more straightforward

@ThisIsAreku ThisIsAreku force-pushed the request_id_from_context branch from cc0678b to 7cd5b0d Compare July 7, 2024 10:11
@samber
Copy link
Owner

samber commented Jul 7, 2024

merci!

@samber samber merged commit dca4eda into samber:main Jul 7, 2024
5 checks passed
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.

2 participants