rogueserver/errors/errors.go
2024-05-15 20:57:58 +02:00

15 lines
237 B
Go

package errors
type HttpError struct {
Code int
Message string
}
func NewHttpError(code int, message string) *HttpError {
return &HttpError{Code: code, Message: message}
}
func (h HttpError) Error() string {
return h.Message
}