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.
|
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
|
|
}
|
|
|