From 8cff1622fce422f7cb42f9c90ca52abe32a40234 Mon Sep 17 00:00:00 2001
From: Ian Luo <ian.luo@gmail.com>
Date: Tue, 18 Aug 2020 22:07:35 +0800
Subject: [PATCH] use len(tag) > 0

---
 cluster/router/tag/tag_router.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cluster/router/tag/tag_router.go b/cluster/router/tag/tag_router.go
index dfd8d451e..0acdf70ce 100644
--- a/cluster/router/tag/tag_router.go
+++ b/cluster/router/tag/tag_router.go
@@ -298,7 +298,7 @@ func poolWithStaticTag(invokers []protocol.Invoker, pool router.AddrPool) {
 	for i, invoker := range invokers {
 		url := invoker.GetUrl()
 		tag := url.GetParam(constant.Tagkey, "")
-		if tag != "" {
+		if len(tag) > 0 {
 			if _, ok := pool[staticPrefix+tag]; !ok {
 				pool[staticPrefix+tag] = roaring.NewBitmap()
 			}
-- 
GitLab