mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 02:47:04 +00:00
❤️ awesome and unique features for end-developers are coming...
total refactor of the hero and mvc packages, see README#Next (it's not completed yet) Former-commit-id: b85ae99cbfe5965ba919c1e15cf4989e787982c0
This commit is contained in:
23
mvc/param.go
23
mvc/param.go
@@ -12,29 +12,6 @@ func getPathParamsForInput(startParamIndex int, params []macro.TemplateParam, fu
|
||||
return
|
||||
}
|
||||
|
||||
// consumedParams := make(map[int]bool, 0)
|
||||
// for _, in := range funcIn {
|
||||
// for j, p := range params {
|
||||
// if _, consumed := consumedParams[j]; consumed {
|
||||
// continue
|
||||
// }
|
||||
|
||||
// // fmt.Printf("%s input arg type vs %s param type\n", in.Kind().String(), p.Type.Kind().String())
|
||||
// if m := macros.Lookup(p.Type); m != nil && m.GoType == in.Kind() {
|
||||
// consumedParams[j] = true
|
||||
// // fmt.Printf("param.go: bind path param func for paramName = '%s' and paramType = '%s'\n", paramName, paramType.String())
|
||||
// funcDep, ok := context.ParamResolverByKindAndIndex(m.GoType, p.Index)
|
||||
// // funcDep, ok := context.ParamResolverByKindAndKey(in.Kind(), paramName)
|
||||
// if !ok {
|
||||
// // here we can add a logger about invalid parameter type although it should never happen here
|
||||
// // unless the end-developer modified the macro/macros with a special type but not the context/ParamResolvers.
|
||||
// continue
|
||||
// }
|
||||
// values = append(values, funcDep)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
consumed := make(map[int]struct{})
|
||||
for _, in := range funcIn {
|
||||
for j, param := range params {
|
||||
|
||||
Reference in New Issue
Block a user