13 lines
250 B
Go
13 lines
250 B
Go
|
package reflect
|
||
|
|
||
|
import "reflect"
|
||
|
|
||
|
// GetTypeInfo is function
|
||
|
func GetTypeInfo(t reflect.Type) (realType reflect.Type, pkgName string, name string) {
|
||
|
if reflect.Ptr == t.Kind() {
|
||
|
return GetTypeInfo(t.Elem())
|
||
|
}
|
||
|
|
||
|
return t, t.PkgPath(), t.Name()
|
||
|
}
|