go-wxhelper/pkg/response/success.go

17 lines
230 B
Go
Raw Normal View History

2024-01-19 12:06:30 +08:00
package response
// Success
// @description: 成功响应
// @receiver r
// @param data
// @return err
func (r *Response) Success() {
if r.msg == "" {
r.msg = "success"
}
if r.code == 0 {
r.code = success
}
r.Result()
}