mirror of
https://github.com/kataras/iris.git
synced 2026-01-28 14:25:57 +00:00
fix https://github.com/kataras/iris/issues/1450 and continue on implementing 1449
Former-commit-id: 617f64d061e88f050a443ea1751fa244164656c5
This commit is contained in:
@@ -138,10 +138,14 @@ func IsFunc(kindable interface {
|
||||
return kindable.Kind() == reflect.Func
|
||||
}
|
||||
|
||||
var reflectValueType = reflect.TypeOf(reflect.Value{})
|
||||
|
||||
func equalTypes(got reflect.Type, expected reflect.Type) bool {
|
||||
if got == expected {
|
||||
return true
|
||||
}
|
||||
|
||||
// fmt.Printf("got: %s expected: %s\n", got.String(), expected.String())
|
||||
// if accepts an interface, check if the given "got" type does
|
||||
// implement this "expected" user handler's input argument.
|
||||
if expected.Kind() == reflect.Interface {
|
||||
@@ -151,10 +155,6 @@ func equalTypes(got reflect.Type, expected reflect.Type) bool {
|
||||
return got.AssignableTo(expected)
|
||||
}
|
||||
|
||||
// if got.String() == "interface {}" {
|
||||
// return true
|
||||
// }
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user