go-clean-arch
go-clean-arch copied to clipboard
Repository should be Unexported except by UseCase
Hi! I think Repositories should be unexported by except the usecase, which can be achieved by putting underscore to function name of new repo instance and move the usecase and repo in one domain package for example:
article
├── usecase.go
├── repo.go
The approach above, will force clients to call service rather than calling the new repo instance.