Skip to content

Commit

Permalink
fix #96, not package interface register error Name
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujhd committed Apr 11, 2024
1 parent 9af26f1 commit 1a28096
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions type.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1a28096

Please sign in to comment.