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 2022/06/21 11:46:19 UTC
[dubbo-go] branch 3.0 updated: Fix: fix revision calc (#1926)
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/3.0 by this push:
new e10e2087a Fix: fix revision calc (#1926)
e10e2087a is described below
commit e10e2087a2d4b3d94752081573b323218c38596d
Author: raynor <ra...@gmail.com>
AuthorDate: Tue Jun 21 19:46:12 2022 +0800
Fix: fix revision calc (#1926)
---
common/metadata_info.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/metadata_info.go b/common/metadata_info.go
index 73670cf36..b365a581b 100644
--- a/common/metadata_info.go
+++ b/common/metadata_info.go
@@ -87,17 +87,17 @@ func (mi *MetadataInfo) CalAndGetRevision() string {
if len(mi.Services) == 0 {
return "0"
}
- candidates := make([]string, 8)
+ candidates := make([]string, 0, 8)
for _, s := range mi.Services {
- sk := s.ServiceKey
+ iface := s.URL.GetParam(constant.InterfaceKey, "")
ms := s.URL.Methods
if len(ms) == 0 {
- candidates = append(candidates, sk)
+ candidates = append(candidates, iface)
} else {
for _, m := range ms {
// methods are part of candidates
- candidates = append(candidates, sk+constant.KeySeparator+m)
+ candidates = append(candidates, iface+constant.KeySeparator+m)
}
}