go-wxhelper/pkg/response/success.go
2024-01-19 12:06:30 +08:00

17 lines
230 B
Go

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()
}