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) } }