Closed cpj555 closed 2 years ago
Gin Context本身就是自己封装的一层,不是golang里面原始的context。看一下https://github.com/gin-gonic/gin/blob/master/context.go#L48
我是想请教两者使用上有本质的差别么 我之前自己写的 trace_id和user用户态都是直接存在*gin.Context里的 而作者的代码 上下文是存在 gin.Context.Request.Context里的
有些包中不用再去引入 gin
大概了解意思了 感谢
我看代码中都是用 gin.Context.Request.Context保存上下文的,为啥不用gin.Context直接保存上下文呢,新手不太了解