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

Function acquireSession

middleware/session/session.go:59–66  ·  view source on GitHub ↗

acquireSession returns a new Session from the pool. Returns: - *Session: The session object. Usage: s := acquireSession()

()

Source from the content-addressed store, hash-verified

57//
58// s := acquireSession()
59func acquireSession() *Session {
60 s := sessionPool.Get().(*Session) //nolint:forcetypeassert,errcheck // We store nothing else in the pool
61 if s.data == nil {
62 s.data = acquireData()
63 }
64 s.isFresh = true
65 return s
66}
67
68// Release releases the session back to the pool.
69//

Callers 2

getSessionMethod · 0.85
GetByIDMethod · 0.85

Calls 2

acquireDataFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected