You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by la...@apache.org on 2021/11/25 05:27:28 UTC

[dubbo-go] branch fix/groupVersionKey created (now 5e2b72f)

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

laurence pushed a change to branch fix/groupVersionKey
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git.


      at 5e2b72f  fix: fix service group and version key

This branch includes the following new commits:

     new 5e2b72f  fix: fix service group and version key

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[dubbo-go] 01/01: fix: fix service group and version key

Posted by la...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5e2b72fccf97859fff5a8c8a15865acddd645d1f
Author: LaurenceLiZhixin <38...@qq.com>
AuthorDate: Thu Nov 25 13:27:07 2021 +0800

    fix: fix service group and version key
---
 config/service_config.go | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/config/service_config.go b/config/service_config.go
index 769ce5e..adc03e3 100644
--- a/config/service_config.go
+++ b/config/service_config.go
@@ -348,8 +348,12 @@ func (svc *ServiceConfig) getUrlMap() url.Values {
 	urlMap.Set(constant.LoadbalanceKey, svc.Loadbalance)
 	urlMap.Set(constant.WarmupKey, svc.Warmup)
 	urlMap.Set(constant.RetriesKey, svc.Retries)
-	urlMap.Set(constant.GroupKey, svc.Group)
-	urlMap.Set(constant.VersionKey, svc.Version)
+	if svc.Group != "" {
+		urlMap.Set(constant.GroupKey, svc.Group)
+	}
+	if svc.Version != "" {
+		urlMap.Set(constant.VersionKey, svc.Version)
+	}
 	urlMap.Set(constant.RegistryRoleKey, strconv.Itoa(common.PROVIDER))
 	urlMap.Set(constant.ReleaseKey, "dubbo-golang-"+constant.Version)
 	urlMap.Set(constant.SideKey, (common.RoleType(common.PROVIDER)).Role())