1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-28 23:37:04 +00:00

🐵 prepare next version: improve the hero and mvc path parameters bindings

Former-commit-id: 0626b91c6448b5cebf1d04ee3f115cde68aa3d6d
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-03-02 19:48:53 +02:00
parent 78ab341862
commit bb66c10ad3
9 changed files with 122 additions and 69 deletions

View File

@@ -55,7 +55,7 @@ var (
})
)
func makeHandler(fn interface{}, c *Container) context.Handler {
func makeHandler(fn interface{}, c *Container, paramsCount int) context.Handler {
if fn == nil {
panic("makeHandler: function is nil")
}
@@ -77,7 +77,7 @@ func makeHandler(fn interface{}, c *Container) context.Handler {
v := valueOf(fn)
numIn := v.Type().NumIn()
bindings := getBindingsForFunc(v, c.Dependencies, c.ParamStartIndex)
bindings := getBindingsForFunc(v, c.Dependencies, paramsCount)
return func(ctx context.Context) {
inputs := make([]reflect.Value, numIn)