zhangzengfei
2024-08-22 9c4763d79154e0c4e708c8c13b5cef1182242edf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package response
 
import (
    "github.com/gin-gonic/gin"
 
    "net/http"
)
 
// 返回成功
func Success(c *gin.Context, data any) {
    c.JSON(http.StatusOK, data)
}
 
func BadRequest(c *gin.Context, data any) {
    c.JSON(http.StatusBadRequest, data)
}