1
0
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:
Gerasimos (Makis) Maropoulos
2018-09-30 17:26:40 +03:00
parent 21ab51bde7
commit a675e8191a
7 changed files with 111 additions and 97 deletions

View File

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