zhangzengfei
2024-05-16 790c60c55054b3e75043eaed11eaef8584d2001d
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)
}