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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user