MCPcopy
hub / github.com/gofiber/fiber / resolveContext

Method resolveContext

middleware/session/middleware.go:196–201  ·  view source on GitHub ↗

resolveContext returns the middleware's stored fiber context if available, otherwise returns context.Background(). fiber.Ctx implements context.Context directly, so no allocation is needed.

()

Source from the content-addressed store, hash-verified

194// otherwise returns context.Background().
195// fiber.Ctx implements context.Context directly, so no allocation is needed.
196func (m *Middleware) resolveContext() context.Context {
197 if m.ctx != nil {
198 return m.ctx
199 }
200 return context.Background()
201}
202
203// acquireMiddleware retrieves a middleware instance from the pool.
204func acquireMiddleware() *Middleware {

Callers 5

saveSessionMethod · 0.95
DestroyMethod · 0.95
ResetMethod · 0.95
RegenerateMethod · 0.95

Calls

no outgoing calls

Tested by 1