mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 18:37:05 +00:00
improve Context.Proceed
Now this is possible: ok := (Handler1) && ctx.Proceed(Handler2)) || ctx.Proceed(Handler3)
This commit is contained in:
@@ -105,10 +105,12 @@ func (api *APIContainer) convertHandlerFuncs(relativePath string, handlersFn ...
|
||||
handlers = append(handlers, api.Container.HandlerWithParams(h, paramsCount))
|
||||
}
|
||||
|
||||
// Note: let end-developer to decide that through Party.SetExecutionRules.
|
||||
// On that type of handlers the end-developer does not have to include the Context in the handler,
|
||||
// so the ctx.Next is automatically called unless an `ErrStopExecution` returned (implementation inside hero pkg).
|
||||
o := ExecutionOptions{Force: true}
|
||||
o.apply(&handlers)
|
||||
//
|
||||
// o := ExecutionOptions{Force: true}
|
||||
// o.apply(&handlers)
|
||||
|
||||
return handlers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user