WithContext set Context with RequestID
(runCtx context.Context)
| 206 | |
| 207 | // WithContext set Context with RequestID |
| 208 | func (ctx *HttpContext) WithContext(runCtx context.Context) { |
| 209 | if runCtx == nil { |
| 210 | panic("nil context") |
| 211 | } |
| 212 | ctx.context = runCtx |
| 213 | ctx.context = context.WithValue(ctx.context, "RequestID", ctx.Request().RequestID()) |
| 214 | } |
| 215 | |
| 216 | // HttpServer return HttpServer |
| 217 | func (ctx *HttpContext) HttpServer() *HttpServer { |