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/12/18 11:53:30 UTC
[dubbo-go] branch 3.0 updated: fix: location trim space (#1306) (#1670)
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 e376834 fix: location trim space (#1306) (#1670)
e376834 is described below
commit e3768344ecb0d22ac22b7e530070f5c15c1c4e40
Author: LeonXu <xf...@gmail.com>
AuthorDate: Sat Dec 18 19:53:23 2021 +0800
fix: location trim space (#1306) (#1670)
---
common/url.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/url.go b/common/url.go
index e65c749..a800a30 100644
--- a/common/url.go
+++ b/common/url.go
@@ -267,6 +267,7 @@ func NewURL(urlString string, opts ...Option) (*URL, error) {
s.Location = serviceURL.Host
s.Path = serviceURL.Path
for _, location := range strings.Split(s.Location, ",") {
+ location = strings.Trim(location, " ")
if strings.Contains(location, ":") {
s.Ip, s.Port, err = net.SplitHostPort(location)
if err != nil {