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

Method resolveContext

middleware/session/session.go:674–679  ·  view source on GitHub ↗

resolveContext returns the session's stored fiber context if available, otherwise returns context.Background(). fiber.Ctx implements context.Context directly, so no allocation is needed. This is used as the default context for non-WithContext method variants.

()

Source from the content-addressed store, hash-verified

672// fiber.Ctx implements context.Context directly, so no allocation is needed.
673// This is used as the default context for non-WithContext method variants.
674func (s *Session) resolveContext() context.Context {
675 if s.ctx != nil {
676 return s.ctx
677 }
678 return context.Background()
679}

Callers 5

DestroyMethod · 0.95
RegenerateMethod · 0.95
ResetMethod · 0.95
SaveMethod · 0.95

Calls

no outgoing calls

Tested by 1