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 2019/09/23 08:29:33 UTC
[dubbo-go] branch develop updated: Fix:load protocol
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/develop by this push:
new 15d792c Fix:load protocol
new 95f857c Merge pull request #218 from hxmhlt/fix_load_protocol
15d792c is described below
commit 15d792c412139a817fb32a0e13b4b3ec02bad5a5
Author: vito.he <hx...@163.com>
AuthorDate: Mon Sep 23 15:53:14 2019 +0800
Fix:load protocol
---
config/protocol_config.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/protocol_config.go b/config/protocol_config.go
index b714236..2803456 100644
--- a/config/protocol_config.go
+++ b/config/protocol_config.go
@@ -37,8 +37,8 @@ func (c *ProtocolConfig) Prefix() string {
func loadProtocol(protocolsIds string, protocols map[string]*ProtocolConfig) []*ProtocolConfig {
returnProtocols := []*ProtocolConfig{}
for _, v := range strings.Split(protocolsIds, ",") {
- for _, prot := range protocols {
- if v == prot.Name {
+ for k, prot := range protocols {
+ if v == k {
returnProtocols = append(returnProtocols, prot)
}
}