From 1a28096bd7bd8dce0e9d63ab8572704837789d4c Mon Sep 17 00:00:00 2001 From: pkujhd Date: Thu, 11 Apr 2024 11:47:52 +0800 Subject: [PATCH] fix #96, not package interface register error Name --- type.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/type.go b/type.go index f97aafd9..eebd64d8 100644 --- a/type.go +++ b/type.go @@ -157,6 +157,9 @@ func resolveTypeName(typ *_type) string { if pkgPath != EmptyString && name != EmptyString { return pkgPath + "." + name } + if name != EmptyString && typ.Kind() != reflect.UnsafePointer { + return name + } //golang <= 1.16 map.bucket has a self-contained struct field if strings.HasPrefix(typ.String(), "map.bucket[") { return typ.String()