15 lines
242 B
Go
15 lines
242 B
Go
package errors
|
|
|
|
type ValidationError struct {
|
|
msg string
|
|
}
|
|
|
|
func NewValidationError(msg string) *ValidationError {
|
|
return &ValidationError{
|
|
msg: msg,
|
|
}
|
|
}
|
|
|
|
func (e *ValidationError) Error() string {
|
|
return "Validation error: " + e.msg
|
|
}
|