Refactoring validation to belong to model
This commit is contained in:
12
internal/repository/repository_errors.go
Normal file
12
internal/repository/repository_errors.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package repository
|
||||
|
||||
type ErrNoOP struct{}
|
||||
type ErrEmptyUpdate struct{}
|
||||
|
||||
func (e *ErrNoOP) Error() string {
|
||||
return "no operation required"
|
||||
}
|
||||
|
||||
func (e *ErrEmptyUpdate) Error() string {
|
||||
return "update cannot be empty"
|
||||
}
|
||||
Reference in New Issue
Block a user