(c *gin.Context, msg string, data ...interface{})
| 109 | } |
| 110 | |
| 111 | func SuccessWithMsgResp(c *gin.Context, msg string, data ...interface{}) { |
| 112 | var respData interface{} |
| 113 | if len(data) > 0 { |
| 114 | respData = data[0] |
| 115 | } |
| 116 | |
| 117 | c.JSON(200, Resp[interface{}]{ |
| 118 | Code: 200, |
| 119 | Message: msg, |
| 120 | Data: respData, |
| 121 | }) |
| 122 | } |
| 123 | |
| 124 | func Pluralize(count int, singular, plural string) string { |
| 125 | if count == 1 { |
no outgoing calls
no test coverage detected