mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
2ab1456414
Former-commit-id: d67f5a5ed9033286bcc4c04f6be612823cba2a57
19 lines
401 B
Go
19 lines
401 B
Go
package mvc
|
|
|
|
import "reflect"
|
|
|
|
var baseControllerTyp = reflect.TypeOf((*BaseController)(nil)).Elem()
|
|
|
|
func isBaseController(ctrlTyp reflect.Type) bool {
|
|
return ctrlTyp.Implements(baseControllerTyp)
|
|
}
|
|
|
|
func getInputArgsFromFunc(funcTyp reflect.Type) []reflect.Type {
|
|
n := funcTyp.NumIn()
|
|
funcIn := make([]reflect.Type, n, n)
|
|
for i := 0; i < n; i++ {
|
|
funcIn[i] = funcTyp.In(i)
|
|
}
|
|
return funcIn
|
|
}
|