GoFrame
框架提供了功能强大的gf
命令行开发辅助工具,是框架发展的一个重要组成部分,工具地址:
工具安装请参考仓库页面。工具安装成功后,可以通过gf
或者gf -h
查看所有支持的命令。复杂的命令可以通过gf COMMAND -h
查看更详细的使用帮助信息,例如:gf gen -h
。
Golang
基础的开发环境,环境安装具体请参考 环境安装 章节。CLI
工具版本会随着最新的框架版本走。当在工具的使用中遇到问题时,可以尝试打开工具的调试模式获得更详细的工具执行日志信息,打开工具调试模式可以通过gf.debug
命令行选项开启,例如:
gf build main.go --gf.debug |
由于 |
当前帮助文档以gf cli v2.0.0
版本为例进行简单的介绍,详细的介绍信息请查看命令行帮助信息。本章内容信息可能会有滞后,最新的具体详细介绍请查看工具帮助信息。
$ gf USAGE gf COMMAND [OPTION] COMMAND env show current Golang environment variables run running go codes with hot-compiled-like feature gen automatically generate go files for dao/dto/entity/pb/pbentity... init create and initialize an empty GoFrame project pack packing any file/directory to a resource file, or a go file build cross-building go project for lots of platforms docker build docker image for current GoFrame project install install gf binary to system (might need root/admin permission) version show version information of current binary OPTION -y, --yes all yes for all command without prompt ask -v, --version show version information of current binary -d, --debug show internal detailed debugging information -h, --help more information about this command ADDITIONAL Use "gf COMMAND -h" for details about a command. |