Hi, I set the user infomation in a filter of gin, the filter is as follows:
func Authentication() gin.HandlerFunc {
return func(c *gin.Context){
userId := "123"
c.Set("userId", userId)
c.Next()
}
}
How should I get the value of userId?
func (h *Handler) current(c droplet.Context) (interface{}, error){
userId := ????
}
Hi, I set the user infomation in a filter of gin, the filter is as follows:
How should I get the value of userId?