Added errors for services

This commit is contained in:
KamilM1205 2025-09-23 22:03:00 +04:00
parent ab4b53fd40
commit c3c3d65d32
12 changed files with 217 additions and 86 deletions

View file

@ -0,0 +1,15 @@
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
}