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

Method Destroy

middleware/session/session.go:191–193  ·  view source on GitHub ↗

Destroy deletes the session from storage and expires the session cookie. Returns: - error: An error if the destruction fails. Usage: err := s.Destroy()

()

Source from the content-addressed store, hash-verified

189//
190// err := s.Destroy()
191func (s *Session) Destroy() error {
192 return s.DestroyWithContext(s.resolveContext())
193}
194
195// DestroyWithContext deletes the session from storage and expires the session cookie,
196// using the provided context for cancellation and timeout control.

Callers 5

Test_Session_MiddlewareFunction · 0.45
GetByIDMethod · 0.45
Test_Store_GetByIDFunction · 0.45
Test_Session_DestroyFunction · 0.45
Test_Session_ConcurrencyFunction · 0.45

Calls 2

DestroyWithContextMethod · 0.95
resolveContextMethod · 0.95

Tested by 4

Test_Session_MiddlewareFunction · 0.36
Test_Store_GetByIDFunction · 0.36
Test_Session_DestroyFunction · 0.36
Test_Session_ConcurrencyFunction · 0.36