1
0
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:
Gerasimos (Makis) Maropoulos
2020-02-14 23:34:56 +02:00
parent 09a410c6cb
commit c13fd84354
24 changed files with 581 additions and 144 deletions

View File

@@ -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
}