HEAVY: finish music service migration, tidy up services, more tests
This commit is contained in:
parent
9e311df462
commit
90a671982c
47 changed files with 2698 additions and 902 deletions
15
errors/validation.go
Normal file
15
errors/validation.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package errors
|
||||
|
||||
type ValidationError struct {
|
||||
message string
|
||||
}
|
||||
func NewValidationError(message string) *ValidationError {
|
||||
return &ValidationError{ message: message }
|
||||
}
|
||||
func (err *ValidationError) Error() string {
|
||||
return err.message
|
||||
}
|
||||
func IsValidationError(err error) bool {
|
||||
_, ok := err.(*ValidationError)
|
||||
return ok
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue