You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/08/14 04:05:17 UTC

[dubbo-go] branch 1.5 updated: 优化Nacos下的ServiceName的命名风格 (#1377)

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch 1.5
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/1.5 by this push:
     new e3d0ae9  优化Nacos下的ServiceName的命名风格 (#1377)
e3d0ae9 is described below

commit e3d0ae985bc6a0c401e548fb073c1675a04a46a9
Author: ChangedenChan <ch...@gmail.com>
AuthorDate: Sat Aug 14 12:05:08 2021 +0800

    优化Nacos下的ServiceName的命名风格 (#1377)
    
    Co-authored-by: Changeden <ch...@unizone.tech>
---
 registry/nacos/registry.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/registry/nacos/registry.go b/registry/nacos/registry.go
index 17064ad..ea98407 100644
--- a/registry/nacos/registry.go
+++ b/registry/nacos/registry.go
@@ -79,8 +79,8 @@ func getServiceName(url *common.URL) string {
 
 func appendParam(target *bytes.Buffer, url *common.URL, key string) {
 	value := url.GetParam(key, "")
+	target.Write([]byte(constant.NACOS_SERVICE_NAME_SEPARATOR))
 	if strings.TrimSpace(value) != "" {
-		target.Write([]byte(constant.NACOS_SERVICE_NAME_SEPARATOR))
 		target.Write([]byte(value))
 	}
 }