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

Function acquireMiddleware

middleware/session/middleware.go:204–210  ·  view source on GitHub ↗

acquireMiddleware retrieves a middleware instance from the pool.

()

Source from the content-addressed store, hash-verified

202
203// acquireMiddleware retrieves a middleware instance from the pool.
204func acquireMiddleware() *Middleware {
205 m, ok := middlewarePool.Get().(*Middleware)
206 if !ok {
207 panic(ErrTypeAssertionFailed.Error())
208 }
209 return m
210}
211
212// releaseMiddleware resets and returns middleware to the pool.
213//

Callers 1

NewWithStoreFunction · 0.85

Calls 2

GetMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected