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

http request store context in structure, it may cause some bug? #41622

Closed
z54604 opened this issue Sep 25, 2020 · 1 comment
Closed

http request store context in structure, it may cause some bug? #41622

z54604 opened this issue Sep 25, 2020 · 1 comment

Comments

@z54604
Copy link

@z54604 z54604 commented Sep 25, 2020

ctx context.Context

according to official document, do not store Contexts inside a struct type, but request.go did(https://golang.org/pkg/context/)

@davecheney
Copy link
Contributor

@davecheney davecheney commented Sep 25, 2020

Thank you for raising this issue. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions.

The request.ctx field was added in Go 1.7 in this change https://go-review.googlesource.com/c/go/+/21496/ I encourage you to review the history of the change and the associated discussion.

GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see:

@davecheney davecheney closed this Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.