You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by xu...@apache.org on 2026/02/16 09:00:06 UTC

(dubbo-go) branch develop updated: feat(router): enable register of script router, remove useless comment (#3215)

This is an automated email from the ASF dual-hosted git repository.

xuetaoli pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new 77428fe0f feat(router): enable register of script router, remove useless comment (#3215)
77428fe0f is described below

commit 77428fe0f84d829092c9bd457c81e8dd0ffd55b5
Author: yangpixi <63...@users.noreply.github.com>
AuthorDate: Mon Feb 16 17:00:00 2026 +0800

    feat(router): enable register of script router, remove useless comment (#3215)
---
 cluster/router/script/factory.go | 10 +++-------
 cluster/router/tag/factory.go    |  5 -----
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/cluster/router/script/factory.go b/cluster/router/script/factory.go
index bb5377aac..831bb711f 100644
--- a/cluster/router/script/factory.go
+++ b/cluster/router/script/factory.go
@@ -20,16 +20,12 @@ package script
 import (
 	"dubbo.apache.org/dubbo-go/v3/cluster/router"
 	"dubbo.apache.org/dubbo-go/v3/common"
+	"dubbo.apache.org/dubbo-go/v3/common/constant"
+	"dubbo.apache.org/dubbo-go/v3/common/extension"
 )
 
 func init() {
-	/*
-		Tag router is not imported in dubbo-go/imports/imports.go, because it relies on config center,
-		and cause warning if config center is empty.
-		User can import this package and config config center to use Script router.
-	*/
-	// TODO(finalt) Temporarily removed until fixed (https://github.com/apache/dubbo-go/pull/2716)
-	//extension.SetRouterFactory(constant.ScriptRouterFactoryKey, NewScriptRouterFactory)
+	extension.SetRouterFactory(constant.ScriptRouterFactoryKey, NewScriptRouterFactory)
 }
 
 // ScriptRouteFactory router factory
diff --git a/cluster/router/tag/factory.go b/cluster/router/tag/factory.go
index 965f1ba96..9be779cd7 100644
--- a/cluster/router/tag/factory.go
+++ b/cluster/router/tag/factory.go
@@ -25,11 +25,6 @@ import (
 )
 
 func init() {
-	/*
-		Tag router is not imported in dubbo-go/imports/imports.go, because it relies on config center,
-		and cause warning if config center is empty.
-		User can import this package and config config center to use tag router.
-	*/
 	extension.SetRouterFactory(constant.TagRouterFactoryKey, NewTagRouterFactory)
 }