robocanic commented on code in PR #1340:
URL: https://github.com/apache/dubbo-admin/pull/1340#discussion_r2484229449
##########
pkg/core/resource/apis/mesh/v1alpha1/affinityroute_types.go:
##########
@@ -106,6 +108,15 @@ func (r *AffinityRouteResource) DeepCopyObject()
k8sruntime.Object {
return out
}
+func (r *AffinityRouteResource) String() string {
+ jsonStr, err := json.Marshal(r)
+ if err != nil {
+ logger.Errorf("failed to encode AffinityRouteResource: %s to
json, err: %s", r.ResourceKey(), err)
Review Comment:
这是打错误日志,日志是用%s,如果是返回一个err,则用fmt.ErrorOf("%w", err)来包装一下
--
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]