You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlexStocks (via GitHub)" <gi...@apache.org> on 2023/06/14 10:09:24 UTC

[GitHub] [dubbo-go] AlexStocks commented on a diff in pull request #2338: fix: solve config bool field zero value bug by using pointer

AlexStocks commented on code in PR #2338:
URL: https://github.com/apache/dubbo-go/pull/2338#discussion_r1229356433


##########
cluster/router/tag/match.go:
##########
@@ -117,7 +117,7 @@ func requestTag(invokers []protocol.Invoker, url *common.URL, invocation protoco
 		logger.Debugf("[tag router] filter dynamic tag address, invokers=%+v", result)
 	}
 	// returns the result directly
-	if cfg.Force || requestIsForce(url, invocation) {
+	if *cfg.Force || requestIsForce(url, invocation) {

Review Comment:
   这里调用的地方可以不加星



##########
cluster/router/tag/router.go:
##########
@@ -58,7 +58,7 @@ func (p *PriorityRouter) Route(invokers []protocol.Invoker, url *common.URL, inv
 		return staticTag(invokers, url, invocation)
 	}
 	routerCfg := value.(config.RouterConfig)
-	if !routerCfg.Enabled || !routerCfg.Valid {
+	if !*routerCfg.Enabled || !*routerCfg.Valid {

Review Comment:
   这里调用的地方可以不加星



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org