Alanxtl commented on code in PR #3080:
URL: https://github.com/apache/dubbo-go/pull/3080#discussion_r2534056188
##########
common/url.go:
##########
@@ -477,8 +477,13 @@ func ParseServiceKey(serviceKey string) (string, string,
string) {
// IsAnyCondition judges if is any condition
func IsAnyCondition(intf, group, version string, serviceURL *URL) bool {
- return intf == constant.AnyValue && (group == constant.AnyValue ||
- group == serviceURL.Group()) && (version == constant.AnyValue
|| version == serviceURL.Version())
+ matchCondition := func(pattern, actual string) bool {
+ return pattern == constant.AnyValue || pattern == actual
+ }
+
+ return matchCondition(intf, serviceURL.Service()) &&
+ matchCondition(group, serviceURL.Group()) &&
+ matchCondition(version, serviceURL.Version())
}
Review Comment:
are you sure java judges in this logic? Can you paste java code here, so
that we can compare it.
--
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]