Why does user_repository have a direct dependency on gorm.DB?
AkashKarnatak opened this issue · comments
In the file interface/repository/user_repository.go
, struct userRepository
has a direct dependency on gorm.DB
which is defined in the outer layer and hence it violates the clean architecture principle.
// interface/repository/user_repository.go
type userRepository struct {
db *gorm.DB
}