NewRespBodyFromError new response body from error
(e *errors.Error)
| 55 | |
| 56 | // NewRespBodyFromError new response body from error |
| 57 | func NewRespBodyFromError(e *errors.Error) *RespBody { |
| 58 | return &RespBody{ |
| 59 | Code: e.Code, |
| 60 | Reason: e.Reason, |
| 61 | Message: e.Message, |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | // NewRespBodyData new response body with data |
| 66 | func NewRespBodyData(code int, reason string, data any) *RespBody { |