From 4499fd93e3b333a2a5264b7027507850ff0b1f8d Mon Sep 17 00:00:00 2001 From: liuhaotian Date: Fri, 14 Jan 2022 20:20:22 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E5=8F=96=E6=B6=88=E6=97=A7=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/brahma/api/murder/internal/config/config.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/app/brahma/api/murder/internal/config/config.go b/app/brahma/api/murder/internal/config/config.go index 3fd642f..14af864 100644 --- a/app/brahma/api/murder/internal/config/config.go +++ b/app/brahma/api/murder/internal/config/config.go @@ -8,7 +8,6 @@ import ( clientV3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "os" - "strings" "time" ) @@ -76,22 +75,6 @@ func GetConfigKey(key string) string { return "" } } -func init() { - connect() -} - -func connect() { - envDefault := GetEnvDefault(EtcdEnd, EtcdEndDefault) - ends := strings.Split(envDefault, ",") - config = clientV3.Config{ - Endpoints: ends, - DialTimeout: 5 * time.Second, - } - if client, err = clientV3.New(config); err != nil { - ctxLogger.FError(nil, error_process.EtcConnError, zap.String("", err.Error())) - os.Exit(-1) - } -} func GetEnvDefault(key, defVal string) string { val, ex := os.LookupEnv(key)