mirror of
https://github.com/kataras/iris.git
synced 2026-01-23 03:45:56 +00:00
split the controller's method lexer and parser to another file to simplify the code, we need more steps to simplify it enough before pushing to master
Former-commit-id: ee968d822088bec428e4b7cee24ca7690d0bf504
This commit is contained in:
@@ -2,6 +2,7 @@ package mvc2
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/pkg/zerocheck"
|
||||
@@ -55,6 +56,16 @@ func equalTypes(got reflect.Type, expected reflect.Type) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func getNameOf(typ reflect.Type) string {
|
||||
elemTyp := indirectTyp(typ)
|
||||
|
||||
typName := elemTyp.Name()
|
||||
pkgPath := elemTyp.PkgPath()
|
||||
fullname := pkgPath[strings.LastIndexByte(pkgPath, '/')+1:] + "." + typName
|
||||
|
||||
return fullname
|
||||
}
|
||||
|
||||
func getInputArgsFromFunc(funcTyp reflect.Type) []reflect.Type {
|
||||
n := funcTyp.NumIn()
|
||||
funcIn := make([]reflect.Type, n, n)
|
||||
|
||||
Reference in New Issue
Block a user