1
0
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:
Gerasimos (Makis) Maropoulos
2021-06-15 00:36:28 +03:00
parent cc181a038c
commit 574db973d0
4 changed files with 125 additions and 27 deletions

View File

@@ -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
}