gen
Converts a database into gorm structs and RESTful api
File Explorer
Download Latest Version (.zip)- main.go
- custom.go.tmpl
- custom.json
- custom.md.tmpl
- sample.gen
- codegen.go
- db_utils.go
- meta.go
- meta_mssql.go
- meta_mysql.go
- meta_postgres.go
- meta_sqlite.go
- meta_unknown.go
- meta_utils.go
- util.go
- util_test.go
- sample.db
- packed-packr.go
- main.go
- api.go.tmpl
- api_add.go.tmpl
- api_delete.go.tmpl
- api_get.go.tmpl
- api_getall.go.tmpl
- api_update.go.tmpl
- code_dao_gorm.md.tmpl
- code_dao_sqlx.md.tmpl
- code_http.md.tmpl
- dao_gorm.go.tmpl
- dao_gorm_add.go.tmpl
- dao_gorm_delete.go.tmpl
- dao_gorm_get.go.tmpl
- dao_gorm_getall.go.tmpl
- dao_gorm_init.go.tmpl
- dao_gorm_update.go.tmpl
- dao_sqlx.go.tmpl
- dao_sqlx_add.go.tmpl
- dao_sqlx_delete.go.tmpl
- dao_sqlx_get.go.tmpl
- dao_sqlx_getall.go.tmpl
- dao_sqlx_init.go.tmpl
- dao_sqlx_update.go.tmpl
- debug.txt
- GEN_README.md.tmpl
- gitignore.tmpl
- gomod.tmpl
- http_utils.go.tmpl
- main_gorm.go.tmpl
- main_sqlx.go.tmpl
- Makefile.tmpl
- mapping.json
- model.go.tmpl
- model_base.go.tmpl
- protobuf.tmpl
- protomain.go.tmpl
- protoserver.go.tmpl
- README.md.tmpl
- router.go.tmpl
- copy.go
- options.go
- results.go
- .gitignore
- .travis.yml
- code_dao_gorm.md
- code_dao_sqlx.md
- code_http.md
- code_model.md
- code_protobuf.md
- go.mod
- LICENSE
- main-packr.go
- main.go
- Makefile
- README.md
- release.history
- release.sh
- test.sh
# Installation Guide
1. Get the code
git clone https://github.com/smallnest/gen
Downloads the entire project code from GitHub to your computer.
cd gen
Moves into the project folder you just downloaded.
2. Go
Medium RecommendedPrerequisites
$ go install github.com/smallnest/gen@latest
Type this command into your terminal and run it.
If the build finishes without errors, it worked. If you used go run ., check the terminal output.
Pulled directly from this repo's README.
3. Make
MediumPrerequisites
- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make
Compiles the code based on the generated build configuration to produce an executable.
If it finishes without errors, it worked. Try running the generated executable directly.
// repository documentation
Was this content helpful?
(0 ratings)
