JGoC provides an easier way to create Go project, model and schedule.
It is designed on the basis JGo and gin.
Sql middleware use mysql, go-mssqldb , godror and pq.
go install github.com/xjustloveux/jgoc@latest
jgoc --name example.com/helloworld --pro
jgoc --name example.com/helloworld --pro --mod
jgoc --name example.com/helloworld --pro --mod --srv
jgoc --name example.com/helloworld --pro --mod --srv --sch
jgoc --name example.com/helloworld --mod
jgoc --name example.com/helloworld --mod --srv
jgoc --name example.com/helloworld --sch
Flags | Type | Comment |
---|---|---|
--name | string | module name, required |
--env | string | jgo config environment value |
--pro | created project framework | |
--mod | created database model, need config/config.json or config/config.yaml file, configuration refer to configuration | |
--pointer | columns of numeric type will be converted to pointer type when creating the model, required flag(s) "mod" | |
--srv | created model service, required flag(s) "mod" | |
--ds | string | specify the datasource name to be created model and service, required flag(s) "mod" |
--table | string | specify the table name to be created model and service, required flag(s) "mod" |
--gorm | create model and service with gorm, model default only json tag, service default jgo, required flag(s) "mod" | |
--sch | created schedule, need config/config.json or config/config.yaml file, configuration refer to configuration | |
--job | string | specify the job name to be created schedule, required flag(s) "sch" |
--help, -h | help for jgoc | |
--version, -v | version for jgoc |