The code contains a dependency of the database component on the controller component
// We taken ctx from request in controller
ctx := c.Request().Context()
// And controller hand it to usercase
func (a *articleUsecase) fillAuthorDetails(c context.Context, data []domain.Article) ([]domain.Article, error)
// And usercase hand it to repository
func (m *mysqlAuthorRepo) GetByID(ctx context.Context, id int64) (domain.Author, error)
If I would like to use library like a GORM I would need to edit 3 components
For the rest, I would like to note that this is so far the best implementation of pure architecture on golang that I know.
The code contains a dependency of the database component on the controller component
If I would like to use library like a GORM I would need to edit 3 components For the rest, I would like to note that this is so far the best implementation of pure architecture on golang that I know.