ing
This commit is contained in:
parent
9a567d18b7
commit
6eeae49d25
|
@ -10,3 +10,14 @@ func GetTypeInfo(t reflect.Type) (realType reflect.Type, pkgName string, name st
|
|||
|
||||
return t, t.PkgPath(), t.Name()
|
||||
}
|
||||
|
||||
// IsTypeKind is function
|
||||
func IsTypeKind(t reflect.Type, kind reflect.Kind, removePtr bool) bool {
|
||||
if reflect.Ptr == t.Kind() {
|
||||
if removePtr {
|
||||
return IsTypeKind(t.Elem(), kind, removePtr)
|
||||
}
|
||||
}
|
||||
|
||||
return kind == t.Kind()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user