github.com/lastbackend/toolkit@v0.0.0-20241020043710-cafa37b95aad/pkg/util/types/types.go (about) 1 package types 2 3 import "reflect" 4 5 func Type(myvar interface{}) string { 6 if t := reflect.TypeOf(myvar); t.Kind() == reflect.Ptr { 7 return "*" + t.Elem().PkgPath() + "." + t.Elem().Name() 8 } else { 9 return t.PkgPath() + "." + t.Name() 10 } 11 }