docsy icon indicating copy to clipboard operation
docsy copied to clipboard

路由继承问题(Route Inheritance problem)

Open Yjppj opened this issue 3 years ago • 0 comments

中文:我想要在add路由中添加一个定时任务对象(添加定时任务是一个协程进行的)到上下文,然后在另一个路由remove中拿到上下文里面的定时任务,从而能够删除这个定时任务,但是每个路由的*gin.Context都是重新分配,我无法拿到在remove路由中保存在上下文中的这个定时任务 English: I want to add a timed task object to the Context in the add route and remove the timed task from the Context in the remove route, but the *gin. Context of each route is reassigned. I can't get the timed task that exists in context in the remove route

Yjppj avatar May 20 '22 01:05 Yjppj