justxuewei commented on code in PR #2191:
URL: https://github.com/apache/dubbo-go/pull/2191#discussion_r1092729700
##########
registry/mock_registry.go:
##########
@@ -19,6 +19,7 @@ package registry
import (
"fmt"
+ gxset "github.com/dubbogo/gost/container/set"
Review Comment:
Please format the imports using the import-formatter tool.
##########
registry/servicediscovery/service_discovery_registry.go:
##########
@@ -196,12 +204,22 @@ func (s *serviceDiscoveryRegistry) Subscribe(url
*common.URL, notify registry.No
if err != nil {
return perrors.WithMessage(err, "subscribe url error:
"+url.String())
}
- services := s.getServices(url)
+
+ mappingListener := event.NewMappingListener(s.url, url,
s.subscribedServices, notify)
+ services := s.getServices(url, mappingListener)
if services.Empty() {
- return perrors.Errorf("Should has at least one way to know
which services this interface belongs to, "+
- "subscription url:%s", url.String())
+ return nil
+ //return perrors.Errorf("Should has at least one way to know
which services this interface belongs to, "+
+ // "subscription url:%s", url.String())
Review Comment:
Please remove it from the code if it is unused.
--
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]