This reository is implemantation of clean code architecture
- This reository is implemantation of clean code architecture using golang . Here i follow Domain driven design. To make the application loosely coupled and unit testable i ustilize interfaces and implement IOC container.
As golang Compile-time Dependency Injection wire(https://github.com/google/wire) is still in alpha, so i write my own injection container. You can found the implementation in injectioncontainer.go file.
It has simple dependencies:
- Chi (Router)
- Dep (Dependency management)
- GORM (ORM library)
- Mapper (Simple mapper)
- Viper(Go configuration)
As i use dep for dependancy management to install all dependancies navigate to code folder and run
dep ensure
It will install all require dependancies.
To run the application
go build
Then
./go-clean-archi
Create a new branch from main branch. Then provide pull request to review and merge code.