From 9977fd1a16c51d84a61d1b5550fb5b9e75c59001 Mon Sep 17 00:00:00 2001 From: liuhaotian Date: Tue, 14 Dec 2021 14:59:42 +0800 Subject: [PATCH] feat: etcReadError --- consts/errors.go | 1 + helper/config_helper.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/consts/errors.go b/consts/errors.go index d3d220e..9b7bcd4 100644 --- a/consts/errors.go +++ b/consts/errors.go @@ -1,6 +1,7 @@ package consts const ( + EtcReadError = "etcdReaderErr" EtcConnError = "etcConnectError" ErrorReason = "reason" PanicError = "panicError" diff --git a/helper/config_helper.go b/helper/config_helper.go index d339d25..719ba13 100644 --- a/helper/config_helper.go +++ b/helper/config_helper.go @@ -38,7 +38,7 @@ func etcdReader(env string) { configMap[string(v.Key)] = string(v.Value) } } else { - ctxLogger.Error(nil, "etcdReaderErr", zap.String("reason", err.Error())) + ctxLogger.Error(nil, consts.EtcReadError, zap.String("reason", err.Error())) os.Exit(-1) } }