You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.go 232 B

1234567891011121314
  1. package response
  2. type BizError struct {
  3. Code int
  4. Err string
  5. }
  6. func (b BizError) Error() string {
  7. return b.Err
  8. }
  9. func NewBizError(err error) *BizError {
  10. return &BizError{Code: RESPONSE_CODE_ERROR_DEFAULT, Err: err.Error()}
  11. }