zhaoyunxing92 commented on a change in pull request #1616:
URL: https://github.com/apache/dubbo-go/pull/1616#discussion_r757556791
##########
File path: registry/nacos/registry.go
##########
@@ -213,8 +209,37 @@ func (nr *nacosRegistry) Subscribe(url *common.URL,
notifyListener registry.Noti
}
// UnSubscribe :
-func (nr *nacosRegistry) UnSubscribe(url *common.URL, notifyListener
registry.NotifyListener) error {
- return perrors.New("UnSubscribe not support in nacosRegistry")
+func (nr *nacosRegistry) UnSubscribe(url *common.URL, _
registry.NotifyListener) error {
+ param := createSubscribeParam(url, nr.URL, nil)
+ if param == nil {
+ return nil
+ }
+ err := nr.namingClient.Client().Unsubscribe(param)
+ if err != nil {
+ return perrors.New("UnSubscribe [" + param.ServiceName + "] to
nacos failed")
Review comment:
可以使用perrors.Errorf()替换下
--
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]