(c *gin.Context, str string, code int, l ...bool)
| 93 | } |
| 94 | |
| 95 | func ErrorStrResp(c *gin.Context, str string, code int, l ...bool) { |
| 96 | if len(l) != 0 && l[0] { |
| 97 | log.Error(str) |
| 98 | } |
| 99 | c.JSON(200, Resp[interface{}]{ |
| 100 | Code: code, |
| 101 | Message: hidePrivacy(str), |
| 102 | Data: nil, |
| 103 | }) |
| 104 | c.Abort() |
| 105 | } |
| 106 | |
| 107 | func SuccessResp(c *gin.Context, data ...interface{}) { |
| 108 | SuccessWithMsgResp(c, "success", data...) |
no test coverage detected