You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "drivebyer (via GitHub)" <gi...@apache.org> on 2023/09/22 06:59:07 UTC

[GitHub] [rocketmq-operator] drivebyer commented on a diff in pull request #180: [ISSUE #137] Support operator watch specify namespace

drivebyer commented on code in PR #180:
URL: https://github.com/apache/rocketmq-operator/pull/180#discussion_r1333960102


##########
main.go:
##########
@@ -61,6 +61,8 @@ func main() {
 	var metricsAddr string
 	var enableLeaderElection bool
 	var probeAddr string
+	var watchNamespace string
+	flag.StringVar(&watchNamespace, "watch-namespace", os.Getenv("WATCH_NAMESPACE"), "The namespace to watch, if not specified, all namespaces will be watched")

Review Comment:
   Actually, the zero value of string is "", see https://go.dev/play/p/VxuM1JP4nxI.
   watchNamespace  := ""  is the same as var watchNamespace string
   
   



-- 
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: commits-unsubscribe@rocketmq.apache.org

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