acquireMiddleware retrieves a middleware instance from the pool.
()
| 202 | |
| 203 | // acquireMiddleware retrieves a middleware instance from the pool. |
| 204 | func 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 | // |
no test coverage detected