另客网go项目公用的代码库

error.go 211B

1234567891011
  1. package request
  2. type HTTPError struct {
  3. Status int `json:"status" example:"http status code"`
  4. Msg string `json:"msg" example:"status bad request"`
  5. }
  6. func (e HTTPError) Error() string {
  7. return e.Msg
  8. }