From 9570a144d310587418b93b602674bfa867c09eec Mon Sep 17 00:00:00 2001 From: fangyincheng <fangyincheng@sina.com> Date: Sun, 8 Sep 2019 15:51:44 +0800 Subject: [PATCH] Fix: format --- protocol/dubbo/readwriter.go | 4 ++-- registry/protocol/protocol.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protocol/dubbo/readwriter.go b/protocol/dubbo/readwriter.go index e43619ebd..eb5cbe786 100644 --- a/protocol/dubbo/readwriter.go +++ b/protocol/dubbo/readwriter.go @@ -141,10 +141,10 @@ func (p *RpcServerPackageHandler) Read(ss getty.Session, data []byte) (interface attachments = req[6].(map[string]string) } pkg.Service.Interface = attachments[constant.INTERFACE_KEY] - if pkg.Service.Path == "" && attachments[constant.PATH_KEY] != "" { + if len(pkg.Service.Path) == 0 && len(attachments[constant.PATH_KEY]) != 0 { pkg.Service.Path = attachments[constant.PATH_KEY] } - if attachments[constant.GROUP_KEY] != "" { + if len(attachments[constant.GROUP_KEY]) != 0 { pkg.Service.Group = attachments[constant.GROUP_KEY] } pkg.Body = map[string]interface{}{ diff --git a/registry/protocol/protocol.go b/registry/protocol/protocol.go index 1f9d81a3a..d01c92ec5 100644 --- a/registry/protocol/protocol.go +++ b/registry/protocol/protocol.go @@ -18,7 +18,6 @@ package protocol import ( - "github.com/apache/dubbo-go/common/proxy/proxy_factory" "sync" ) @@ -27,6 +26,7 @@ import ( "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" "github.com/apache/dubbo-go/common/logger" + "github.com/apache/dubbo-go/common/proxy/proxy_factory" "github.com/apache/dubbo-go/protocol" "github.com/apache/dubbo-go/protocol/protocolwrapper" "github.com/apache/dubbo-go/registry" -- GitLab