You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
276 B
16 lines
276 B
2 years ago
|
package app
|
||
|
|
||
|
type Error struct {
|
||
|
Status int `json:"-"`
|
||
|
Code int `json:"code"`
|
||
|
Message string `json:"message"`
|
||
|
}
|
||
|
|
||
|
func NewError(code int, message string) *Error {
|
||
|
return &Error{Code: code, Message: message}
|
||
|
}
|
||
|
|
||
|
func (e *Error) Error() string {
|
||
|
return e.Message
|
||
|
}
|