Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Note |
---|
最新的从 |
重要说明
- 框架
CLI
工具提供的代码生成功能,目的是规范化项目代码编写、简化项目开发工作复杂度,让开发者能够把精力聚焦于业务逻辑本身。 CLI
工具本身会需要有一定前置的学习和理解成本(尽量理解为什么),但在熟练之后,大家的开发工作将会事半功倍。CLI
工具的代码生成功能针对于企业级项目、多成员的团队性项目中收益会非常高。但针对于单人小型项目,开发者可根据个人意愿评估是否选择使用。GoFrame
框架本身是采用组件化的灵活设计,不会对项目代码做严格的要求;但CLI
工具会有一定的条框限制,不会使得开发者的代码编写过于随意。
使用方式
Code Block | ||
---|---|---|
| ||
$ gf gen -h USAGE gf gen COMMAND [OPTION] COMMAND dao automatically generate go files for dao/do/entity pb parse proto files and generate protobuf go files pbentity generate entity message files in protobuf3 format service parse struct and associated functions from packages to generate service go file DESCRIPTION The "gen" command is designed for multiple generating purposes. It's currently supporting generating go files for ORM models, protobuf and protobuf entity files. Please use "gf gen dao -h" for specified type help. |
相关文档
Children Display | ||||
---|---|---|---|---|
|
Panel | ||
---|---|---|
| ||
|