Documentation is an essential aspect of software development. It provides detailed explanations and descriptions of code, enabling developers to understand and use the code effectively. In Go, code documentation is commonly written using the godoc format.
The godoc is the official documentation for the Go programming language. It provides detailed descriptions of all of the Go packages, including their functions, types, and variables.
"Domain driven design" (aka DDD) and "Clean Architecture" are adopted, but the project layout is based on Golang's layout convention (https://github.com/golang-standards/project-layout).
Do not reverse the dependency flow in the diagram. e.g.: pkg → usecase or infrastructure → adapter is prohibited
usecase/repo
and usecase/gateway
The Clean Architecture is a software design approach that separates the application's concerns into different layers. The layers are:
The Clean Architecture enforces a strict dependency rule: components in the outer layers cannot depend on components in the inner layers. This rule ensures that the application is easy to understand and maintain. More details can be found in this book.
Here is a more detailed explanation of each step: