FinalT commented on code in PR #2503:
URL: https://github.com/apache/dubbo-go/pull/2503#discussion_r1392095798
##########
common/url.go:
##########
@@ -818,6 +818,14 @@ func MergeURL(serviceURL *URL, referenceURL *URL) *URL {
mergedURL.Methods[i] = method
}
}
+
+ // merge attributes
+ if mergedURL.attributes == nil {
+ mergedURL.attributes = make(map[string]interface{},
len(referenceURL.attributes))
+ }
+ for attrK, attrV := range referenceURL.attributes {
+ mergedURL.attributes[attrK] = attrV
Review Comment:
if mergedURL contains attributes (a1 -> v1) and referenceURL contains
attributes (a1 -> v2), mergedURL's attributes will be overridden.I think we
should check to see if the key exists before setting
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]