AlexStocks commented on code in PR #3574:
URL: https://github.com/apache/dubbo-go/pull/3574#discussion_r3726943680


##########
protocol/dubbo/hessian2/hessian_request.go:
##########
@@ -126,31 +124,55 @@ func packRequest(service Service, header DubboHeader, req 
any) ([]byte, error) {
        // body
        //////////////////////////////////////////
        if hb {
-               _ = encoder.Encode(nil)
+               if err := encoder.Encode(nil); err != nil {
+                       return nil, perrors.Wrap(err, "failed to encode 
heartbeat request")
+               }
                goto END
        }
 
+       if err := encodeRequestBody(encoder, service, request, args); err != 
nil {
+               return nil, err
+       }
+
+END:

Review Comment:
   这咋 goto 都用上了?把这里改进下



-- 
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]

Reply via email to