1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-24 05:17:03 +00:00

add 'Context.Register/RemoveDependency' for registering dependencies for next handler in the chain from a common iris handler in serve-time

And also, add a Configuration.FireEmptyFormError if end-dev wants to receive an iris.ErrEmptyForm error on missing form data on 'Context.ReadForm/ReadBody'


Former-commit-id: a2713bec77375b2908f1f066a46be4f19e6b7a61
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-05-19 09:28:27 +03:00
parent c0fd429a43
commit c866709acc
10 changed files with 181 additions and 8 deletions

View File

@@ -75,7 +75,8 @@ func makeHandler(fn interface{}, c *Container, paramsCount int) context.Handler
}
v := valueOf(fn)
numIn := v.Type().NumIn()
typ := v.Type()
numIn := typ.NumIn()
bindings := getBindingsForFunc(v, c.Dependencies, paramsCount)