mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 19:37:03 +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:
@@ -2,7 +2,7 @@ package mvc2
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/kataras/di"
|
||||
"github.com/kataras/iris/mvc2/di"
|
||||
"reflect"
|
||||
"runtime"
|
||||
|
||||
@@ -23,7 +23,7 @@ func isContextHandler(handler interface{}) (context.Handler, bool) {
|
||||
}
|
||||
|
||||
func validateHandler(handler interface{}) error {
|
||||
if typ := reflect.TypeOf(handler); !isFunc(typ) {
|
||||
if typ := reflect.TypeOf(handler); !di.IsFunc(typ) {
|
||||
return fmt.Errorf("handler expected to be a kind of func but got typeof(%s)", typ.String())
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user