()
| 14 | } |
| 15 | |
| 16 | func (c *CommonError) Error() string { |
| 17 | return fmt.Sprintf("%s Error , errcode=%d , errmsg=%s", c.apiName, c.ErrCode, c.ErrMsg) |
| 18 | } |
| 19 | |
| 20 | // NewCommonError 新建 CommonError 错误,对于无 errcode 和 errmsg 的返回也可以返回该通用错误 |
| 21 | func NewCommonError(apiName string, code int64, msg string) *CommonError { |
no outgoing calls