AlexStocks commented on a change in pull request #1161:
URL: https://github.com/apache/dubbo-go/pull/1161#discussion_r615338631



##########
File path: metadata/service/inmemory/service_proxy.go
##########
@@ -60,13 +60,33 @@ func (m *MetadataServiceProxy) 
GetExportedURLs(serviceInterface string, group st
        res := m.invkr.Invoke(context.Background(), inv)
        if res.Error() != nil {
                logger.Errorf("could not get the metadata service from remote 
provider: %v", res.Error())
-               return []interface{}{}, nil
+               return []*common.URL{}, nil
        }
 
-       urlStrs := res.Result().(*[]interface{})
+       urlStrs := res.Result().([]string)
+       ret := make([]*common.URL, 0, len(urlStrs))
+       for _, v := range urlStrs {
+               tempURL, err := common.NewURL(v)
+               if err != nil {
+                       return []*common.URL{}, err
+               }
+               ret = append(ret, tempURL)
+       }
+       return ret, nil
+}
+
+func (m *MetadataServiceProxy) GetExportedServiceURLs() []*common.URL {

Review comment:
       // nolint




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

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