NewRespBody new response body
(code int, reason string)
| 47 | |
| 48 | // NewRespBody new response body |
| 49 | func NewRespBody(code int, reason string) *RespBody { |
| 50 | return &RespBody{ |
| 51 | Code: code, |
| 52 | Reason: reason, |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // NewRespBodyFromError new response body from error |
| 57 | func NewRespBodyFromError(e *errors.Error) *RespBody { |