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)