wongoo commented on a change in pull request #283:
URL: https://github.com/apache/dubbo-go-hessian2/pull/283#discussion_r726690860
##########
File path: encode.go
##########
@@ -155,6 +162,14 @@ func (e *Encoder) Encode(v interface{}) error {
default:
t := UnpackPtrType(reflect.TypeOf(v))
+
+ if DecodeTypeRegexp.Match([]byte(t.String())) { // unpack base
type
Review comment:
I think it's better to move the type regex check block as the default
switch case, if no kind match then check the regex match.
--
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]