go-wxhelper/pkg/response/fail.go

17 lines
226 B
Go
Raw Normal View History

2024-01-19 12:06:30 +08:00
package response
// Fail
// @description: 失败响应
// @receiver r
// @param data
// @return err
func (r *Response) Fail() {
if r.msg == "" {
r.msg = "系统错误"
}
if r.code == 0 {
r.code = fail
}
r.Result()
}