mirror of
https://github.com/kataras/iris.git
synced 2025-12-26 22:37:08 +00:00
remove the old 'mvc' folder - examples are not changed yet - add the 'di' package inside the mvc2 package - which will be renamed to 'mvc' on the next commit - new mvc.Application and some dublications removed - The new version will be version 9 because it will contain breaking changes (not to the end-developer's controllers but to the API they register them) - get ready for 'Christmas Edition' for believers
Former-commit-id: c7114233dee90ee308c0a3e77ec2ad0c361094b8
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/fatih/structs"
|
||||
"github.com/kataras/iris/mvc2/di"
|
||||
|
||||
"github.com/kataras/iris/context"
|
||||
)
|
||||
|
||||
@@ -405,7 +407,7 @@ func (r View) Dispatch(ctx context.Context) { // r as Response view.
|
||||
setViewData(ctx, m)
|
||||
} else if m, ok := r.Data.(context.Map); ok {
|
||||
setViewData(ctx, m)
|
||||
} else if indirectVal(reflect.ValueOf(r.Data)).Kind() == reflect.Struct {
|
||||
} else if di.IndirectValue(reflect.ValueOf(r.Data)).Kind() == reflect.Struct {
|
||||
setViewData(ctx, structs.Map(r))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user