enhance(response):应用生成相应的函数。

This commit is contained in:
徐涛 2022-08-10 15:28:57 +08:00
parent 2281ebe00b
commit 331089a39d

View File

@ -15,12 +15,12 @@ func Router() *gin.Engine {
return router
}
//404
// 404
func HandleNotFound(c *gin.Context) {
response.NewResult(c).Error(404, "资源未找到")
response.NewResult(c).NotFound("指定资源未找到。")
}
//500
// 500
func Recover(c *gin.Context) {
defer func() {
if r := recover(); r != nil {