From 157ac6c0967531973dc391c0c57c65ff588d6684 Mon Sep 17 00:00:00 2001 From: yfh Date: Mon, 24 Feb 2025 23:16:53 +0800 Subject: [PATCH] =?UTF-8?q?NewUnitHelper=E6=B7=BB=E5=8A=A0configHelper?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unitHelper.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/unitHelper.go b/unitHelper.go index 209be9b..c19c22c 100644 --- a/unitHelper.go +++ b/unitHelper.go @@ -2,7 +2,6 @@ package common_utils import ( "gitea.anxinyun.cn/container/common_models" - "gitea.anxinyun.cn/container/common_utils/configLoad" "log" "strings" ) @@ -12,10 +11,10 @@ type UnitHelper struct { unitsGroup map[string][]common_models.DataUnit } -func NewUnitHelper() *UnitHelper { - redisAddr := configLoad.LoadConfig().GetString("redis.address") +func NewUnitHelper(configHelper *ConfigHelper) *UnitHelper { + //redisAddr := configLoad.LoadConfig().GetString("redis.address") unitHelper := &UnitHelper{ - configHelper: NewConfigHelper(redisAddr), + configHelper: configHelper, //NewConfigHelper(redisAddr), unitsGroup: map[string][]common_models.DataUnit{}, } unitHelper.getUnitsGroup()