Skip to content

Commit

Permalink
fix: location trim space (#1306) (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
xfstart07 committed Dec 18, 2021
1 parent 5550feb commit e376834
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/url.go
Expand Up @@ -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 {
Expand Down

0 comments on commit e376834

Please sign in to comment.