From e81729324c1ee5e6c2ecb699424998fe9fbd75e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Sat, 11 Feb 2023 23:35:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF=E7=A0=81?= =?UTF-8?q?=E6=9C=AA=E6=B3=A8=E5=86=8C=E6=97=B6,=20message=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 22 +++++++++++++++++++--- code.go | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 429c340..beb1148 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,7 +5,7 @@ - + - + @@ -34,6 +34,9 @@ + + @@ -59,4 +71,8 @@ + + false + true + \ No newline at end of file diff --git a/code.go b/code.go index 65e416d..338ce29 100644 --- a/code.go +++ b/code.go @@ -72,7 +72,7 @@ func getMessage(code interface{}) string { message, exist := codeTable[code] if !exist { // 无论是否开启 messageWithCode , 未知错误强行带 code - return fmt.Sprintf("未知错误【%v】", codeTable) + return fmt.Sprintf("未知错误【%v】", code) } if messageWithCode { if code == defaultSuccessCode {