mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 13:05:56 +00:00
fix macro registration issue and match by kind for MVC and hero instead of its kind, so custom types like structs can be used without any issues. Add an example on how to register a custom macro it is just few lines and all in one place in this version.
Former-commit-id: 93c439560fcfad820f9f3e39c1d9557c83cef0ee
This commit is contained in:
@@ -39,7 +39,7 @@ func getPathParamsForInput(params []macro.TemplateParam, funcIn ...reflect.Type)
|
||||
if len(funcIn) <= i {
|
||||
return
|
||||
}
|
||||
funcDep, ok := context.ParamResolverByKindAndIndex(funcIn[i].Kind(), param.Index)
|
||||
funcDep, ok := context.ParamResolverByTypeAndIndex(funcIn[i], param.Index)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user