junjiexh commented on code in PR #2607:
URL: https://github.com/apache/fory/pull/2607#discussion_r2344221039
##########
go/fory/type.go:
##########
@@ -597,15 +604,10 @@ func (r *typeResolver) getTypeInfo(value reflect.Value,
create bool) (TypeInfo,
}
clean := strings.TrimPrefix(rawInfo, "*@")
clean = strings.TrimPrefix(clean, "@")
+ typeName = clean
if idx := strings.LastIndex(clean, "."); idx != -1 {
pkgPath = clean[:idx]
- } else {
- pkgPath = clean
- }
- if typ.Kind() == reflect.Ptr {
- typeName = typ.Elem().Name()
- } else {
- typeName = typ.Name()
+ typeName = clean[idx+1:]
Review Comment:
Here fix a bug that cause user specific tag not work on typeName(In the
past, if user register a type called C with 'A.B', the typeName and pkgName
will be 'A.C')
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]