mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 12:31:58 +00:00
Document https://github.com/kataras/iris/issues/720 and fix https://github.com/kataras/iris/issues/719 for good
Former-commit-id: 75b855bee9216c28ce8e1ff46aee467766c37f23
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user