The goal of the project is to have every common usage of code generation in a typical Golang project.
The project uses Standard Go Project Layout as a basis
- OpenAPI generation with swag, see
main.go
- Stringer with stringer
internal/app/example/model/model.go
- Interface mocking for tests with Mockery, see
main_test.go
- SQL Query code generation with sqlc, see ``
make install_tools
Run the following code to invoke code generation:
make generate