This commit is contained in:
병준 박 2019-11-12 23:21:34 +09:00
commit 9a567d18b7
2 changed files with 15 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.loafle.net/loafer/util-go
go 1.13

12
reflect/type.go Normal file
View File

@ -0,0 +1,12 @@
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()
}