feat: improvements in entity domain logic
This commit is contained in:
@@ -5,10 +5,9 @@
|
||||
package mock
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
|
||||
entity "github.com/eminetto/clean-architecture-go-v2/domain/entity"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockReader is a mock of Reader interface
|
||||
|
||||
@@ -27,10 +27,6 @@ func (s *Service) CreateBook(title string, author string, pages int, quantity in
|
||||
if err != nil {
|
||||
return b.ID, err
|
||||
}
|
||||
err = b.Validate()
|
||||
if err != nil {
|
||||
return b.ID, err
|
||||
}
|
||||
return s.repo.Create(b)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user