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 AlreadyExistsError struct {
msg string
}
func NewAlreadyExistsError(msg string) *AlreadyExistsError {
return &AlreadyExistsError{
msg: msg,
}
}
func (e *AlreadyExistsError) Error() string {
return "Already exists: " + e.msg
}