添加在err方法输出data的函数

This commit is contained in:
Yun
2025-12-06 22:57:01 +08:00
parent 8ba1db76c0
commit c50605587a
2 changed files with 10 additions and 2 deletions
+4
View File
@@ -8,6 +8,10 @@ func GinError(ctx *gin.Context, err error) {
Error(ctx, ctx.Writer, err)
}
func GinErrorData(ctx *gin.Context, err error, data interface{}) {
ErrorWithData(ctx, ctx.Writer, err, data)
}
func GinErrorStr(ctx *gin.Context, msg string) {
ErrorStr(ctx, ctx.Writer, msg)
}