From 72d8e938e075d9a0eb84d2e35cacf75f032158a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Wed, 24 Aug 2022 08:26:59 +0800 Subject: [PATCH] =?UTF-8?q?enhance(response):=E4=BC=98=E5=8C=96=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E5=8A=9F=E6=97=B6=E4=BD=BF=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- response/base_response.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/response/base_response.go b/response/base_response.go index cf2d3f8..689aa86 100644 --- a/response/base_response.go +++ b/response/base_response.go @@ -56,8 +56,8 @@ func (r *Result) Unauthorized(msg string) { } // 简易操作成功信息 -func (r *Result) Success(msg string) { - r.response(http.StatusOK, http.StatusOK, msg) +func (r *Result) Success(msg string, payloads ...map[string]interface{}) { + r.response(http.StatusOK, http.StatusOK, msg, payloads...) } // 数据成功创建