Auto Create Golang Struct (Models) from local database
- Build this project as java project.
- Execute JAR file, (look at the output directory : db-to-struct/db-to-struct/out/artifacts/db_to_struct_jar/db_to_struct.jar)
--init [db_user],[db_password],[database] --tbl [table_name]
--init [db_user],[db_password],[database] --tbl [table_name]
--init [db_user],[db_password],[database] --tbl all
Example: --init root,root,MyDataBase --tbl tbl_user --package domain
Without --package, package will be created as models
- Go-lint -> Exported type should have comment or be unexported (go-lint)
- Go-lint -> Struct field with "id" prefix should be UpperCase (go-lint)
https://www.youtube.com/watch?v=2Q5F_4Yv4oU