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

fix unexpected ctx variable capture on Tracing #419

Merged
merged 5 commits into from
Nov 12, 2018
Merged

Conversation

vvakame
Copy link
Collaborator

@vvakame vvakame commented Nov 9, 2018

I tried Tracing with reqCtx.GetErrors, but I can't get errors expectedly.
BAD: https://play.golang.org/p/AswrHXxcgT7
GOOD: https://play.golang.org/p/Ftk_SLFVVgw
https://golang.org/ref/spec#Defer_statements

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@vektah
Copy link
Collaborator

vektah commented Nov 12, 2018

Looks good, but this could use a test.

@vvakame
Copy link
Collaborator Author

vvakame commented Nov 12, 2018

did it!

@vektah vektah merged commit 981fd10 into master Nov 12, 2018
@vektah vektah deleted the fix-capture-ctx branch November 12, 2018 21:42
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
fix unexpected ctx variable capture on Tracing
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

2 participants