Last active
February 10, 2023 08:43
-
-
Save manakuro/36ddbafe3336f95c0a2ed654ad0c8a82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package registry | |
import ( | |
"golang-clean-architecture/interface/controller" | |
ip "golang-clean-architecture/interface/presenter" | |
ir "golang-clean-architecture/interface/repository" | |
"golang-clean-architecture/usecase/interactor" | |
) | |
func (r *registry) NewUserController() controller.UserController { | |
userInteractor := interactor.NewUserInteractor( | |
ir.NewUserRepository(r.db), | |
ip.NewUserPresenter(), | |
ir.NewDBRepository(r.db), | |
) | |
return controller.NewUserController(userInteractor) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment