From d25382b87ae51ec349733b8445e82bc144d26153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Wed, 15 Jun 2022 15:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8C=85=E8=A3=85=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- error.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/error.go b/error.go index 0349e84..6604093 100644 --- a/error.go +++ b/error.go @@ -24,6 +24,9 @@ func FlagNotFound(flag string) error { // // Date : 7:30 下午 2021/2/27 func LoggerInitFail(flag string, err error) error { + if nil == err { + return nil + } return errors.Wrapf(err, "标识为 %s 的redis日志初始化失败", flag) } @@ -60,5 +63,8 @@ func ReceiverISNIL() error { // // Date : 10:07 下午 2021/2/27 func ResultConvertFail(err error) error { + if nil == err { + return nil + } return errors.Wrapf(err, "数据结果解析失败") }