mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 20:41:57 +00:00
Former-commit-id: 129d115937617e4d77b7e6e7efddf3168b15d021
This commit is contained in:
@@ -114,6 +114,11 @@ func makeHandler(fn interface{}, c *Container, paramsCount int) context.Handler
|
||||
inputs[binding.Input.Index] = input
|
||||
}
|
||||
|
||||
// fmt.Printf("For func: %s | valid input deps length(%d)\n", typ.String(), len(inputs))
|
||||
// for idx, in := range inputs {
|
||||
// fmt.Printf("[%d] (%s) %#+v\n", idx, in.Type().String(), in.Interface())
|
||||
// }
|
||||
|
||||
outputs := v.Call(inputs)
|
||||
if err := dispatchFuncResult(ctx, outputs, resultHandler); err != nil {
|
||||
c.GetErrorHandler(ctx).HandleError(ctx, err)
|
||||
|
||||
@@ -115,7 +115,8 @@ func (s *Struct) Acquire(ctx context.Context) (reflect.Value, error) {
|
||||
}
|
||||
|
||||
ctrl := ctx.Controller()
|
||||
if ctrl.Kind() == reflect.Invalid {
|
||||
if ctrl.Kind() == reflect.Invalid ||
|
||||
ctrl.Type() != s.ptrType /* in case of changing controller in the same request (see RouteOverlap feature) */ {
|
||||
ctrl = reflect.New(s.elementType)
|
||||
ctx.Values().Set(context.ControllerContextKey, ctrl)
|
||||
elem := ctrl.Elem()
|
||||
|
||||
Reference in New Issue
Block a user