Skip to content

Commit

Permalink
优化Nacos下的ServiceName的命名风格 (#1352)
Browse files Browse the repository at this point in the history
Co-authored-by: Changeden <chenzhiduan@unizone.tech>
  • Loading branch information
ChangedenCZD and Changeden committed Jul 30, 2021
1 parent 92df41c commit f76b01c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion registry/nacos/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func getServiceName(url *common.URL) string {

func appendParam(target *bytes.Buffer, url *common.URL, key string) {
value := url.GetParam(key, "")
target.Write([]byte(constant.NACOS_SERVICE_NAME_SEPARATOR))
if strings.TrimSpace(value) != "" {
target.Write([]byte(constant.NACOS_SERVICE_NAME_SEPARATOR))
target.Write([]byte(value))
}
}
Expand Down

0 comments on commit f76b01c

Please sign in to comment.