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

Should use gin.Context as context.Context? #2646

Open
gozelus opened this issue Feb 27, 2021 · 1 comment
Open

Should use gin.Context as context.Context? #2646

gozelus opened this issue Feb 27, 2021 · 1 comment

Comments

@gozelus
Copy link

gozelus commented Feb 27, 2021

Description

My project use gorm and I will pass context.Context to this query functions, whether can pass *gin.Context as context.Context to this functions?

@gozelus gozelus changed the title Should user gin.Context as context.Context? Should use gin.Context as context.Context? Feb 27, 2021
@kszafran
Copy link
Contributor

kszafran commented Aug 6, 2021

Currently *gin.Context behaves like context.Background (with the exception of Value, which calls (*gin.Context).Get). That might change soon with 9a575a4 (I don't know why it was not included in v1.7.3).

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

No branches or pull requests

2 participants