AlexStocks commented on code in PR #3160:
URL: https://github.com/apache/dubbo-go/pull/3160#discussion_r2694316854
##########
common/url.go:
##########
@@ -867,25 +874,61 @@ func (c *URL) MergeURL(anotherUrl *URL) *URL {
return mergedURL
}
-// Clone will copy the URL
-func (c *URL) Clone() *URL {
- newURL := &URL{}
- if err := copier.Copy(newURL, c); err != nil {
- // this is impossible
- return newURL
+// CloneWithFilter - Clone the URL with parameter filtering
+// excludeParams: the set of parameters to exclude from the cloned URL
+// reserveParams: the set of parameters to retain in the cloned URL
+func (c *URL) CloneWithFilter(excludeParams *gxset.HashSet, reserveParams
[]string) *URL {
Review Comment:
给这几个 Clone 函数也都添加一些 ut 吧
--
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]