最新的CLI工具版本功能会随着GoFrame框架的最新版本编译,引入如果本地的CLI工具自动化生成的代码与项目的GoFrame框架版本出现兼容性问题时,建议升级项目框架版本,或者自定义安装旧版本的CLI工具。旧版本CLI工具安装方式参考仓库首页介绍:https://github.com/gogf/gf-cli

使用方式

  1. $ gf gen -h
  2. USAGE
  3. gf gen COMMAND [OPTION]
  4. COMMAND
  5. dao automatically generate go files for dao/do/entity
  6. pb parse proto files and generate protobuf go files
  7. pbentity generate entity message files in protobuf3 format
  8. service parse struct and associated functions from packages to generate service go file
  9. DESCRIPTION
  10. The "gen" command is designed for multiple generating purposes.
  11. It's currently supporting generating go files for ORM models, protobuf and protobuf entity files.
  12. Please use "gf gen dao -h" for specified type help.

相关文档