1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 12:31:58 +00:00
Former-commit-id: 75b855bee9216c28ce8e1ff46aee467766c37f23
This commit is contained in:
kataras
2017-08-13 01:47:19 +03:00
parent 960ddb9f72
commit 39a24fb7cb
8 changed files with 111 additions and 27 deletions

View File

@@ -21,6 +21,11 @@ func New(newFunc func() Context) *Pool {
}
// Attach changes the pool's return value Context.
//
// The new Context should explicitly define the `Next()`
// and `Do(context.Handlers)` functions.
//
// Example: https://github.com/kataras/iris/blob/master/_examples/routing/custom-context/method-overriding/main.go
func (c *Pool) Attach(newFunc func() Context) {
c.newFunc = newFunc
}