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

15 lines
231 B
Go

package utils
type Error struct {
Code int `json:"code"`
Message string `json:"message"`
}
func NewError(code int, msg string) error {
return Error{code, msg}
}
func (this Error) Error() string {
return this.Message
}