/codegen

Code generator

Primary LanguageGoGNU General Public License v3.0GPL-3.0

codegen

Code generator

codegen_screenshot

Install

go install github.com/demisang/codegen@latest

Get template samples

  • Golang onion-architecture code samples (will extract to ./pkg/codegen/templates)
    DIR=pkg/codegen/templates; mkdir -p $DIR && wget -qO- https://github.com/demisang/codegen/raw/main/templates/go_onion.tar.gz | tar xvzf - -C $DIR

Makefile:

# codegen: run codegen app on http://localhost:4765
codegen:
	codegen --root="./" --templates="./pkg/codegen/templates"

Open GUI http://localhost:4765

Usage

Feel free to create/edit templates in pkg/codegen/templates adapted for your project