MCPcopy Create free account
hub / github.com/devfeel/dotweb / WithContext

Method WithContext

context.go:208–214  ·  view source on GitHub ↗

WithContext set Context with RequestID

(runCtx context.Context)

Source from the content-addressed store, hash-verified

206
207// WithContext set Context with RequestID
208func (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
217func (ctx *HttpContext) HttpServer() *HttpServer {

Callers

nothing calls this directly

Calls 2

RequestMethod · 0.95
RequestIDMethod · 0.80

Tested by

no test coverage detected