Mulavar commented on a change in pull request #1565:
URL: https://github.com/apache/dubbo-go/pull/1565#discussion_r744622690



##########
File path: registry/nacos/service_discovery.go
##########
@@ -330,22 +328,21 @@ func (n *nacosServiceDiscovery) String() string {
 }
 
 // newNacosServiceDiscovery will create new service discovery instance
-func newNacosServiceDiscovery() (registry.ServiceDiscovery, error) {
-       metadataReportConfig := config.GetMetadataReportConfg()
-       url := common.NewURLWithOptions(
-               common.WithParams(make(url.Values)),
-               common.WithPassword(metadataReportConfig.Password),
-               common.WithUsername(metadataReportConfig.Username),
-               common.WithParamsValue(constant.RegistryTimeoutKey, 
metadataReportConfig.Timeout))
-       url.Location = metadataReportConfig.Address
-       client, err := nacos.NewNacosClientByUrl(url)
+func newNacosServiceDiscovery(url *common.URL) (registry.ServiceDiscovery, 
error) {
+       discoveryUrl := common.NewURLWithOptions(
+               common.WithParams(url.GetParams()),
+               common.WithParamsValue(constant.NacosUsername, url.Username),
+               common.WithParamsValue(constant.NacosPassword, url.Password),
+               common.WithParamsValue(constant.NacosNamespaceID, 
url.GetParam(constant.NamespaceKey, "")))

Review comment:
       要不这个常量名直接改成 NacosNamespaceID,和前者统一一下?




-- 
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: notifications-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to