GF为GoFrame辅助工具链,地址:https://github.com/gogf/gf-cli;下载对应平台
D:\17.gfcli>gf -h
USAGE
gf COMMAND [OPTION]
COMMAND
up upgrade GoFrame version/tool to latest one in current project
env show current Golang environment variables
fix auto fixing codes after upgrading to new GoFrame version
run running go codes with hot-compiled-like feature
gen automatically generate go files for dao/do/entity/pb/pbentity
tpl template parsing and building commands
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.
install 安装
version 查看版本
up 更新
init 初始化项目
run 热编译,自动编译
build 交叉编译
gen 自动生成,现在主要是生成controller,service,dao,model,enums等
fix 兼容修复
pack 打成二进制包
tpl 模板解析和构建命令
docker 生成docker文件
help 帮助
D:\>dir
2020/04/26 23:02 21,447,168 gf.exe
D:\>gf install
I found some installable paths for you:
Id | Writable | Installed | Path
0 | true | false | D:\develop\go\bin
1 | true | false | D:\Program Files (x86)\NetSarang\Xshell 6\
3 | true | false | D:\Program Files\Git\cmd
5 | true | false | C:\Users\XXXX\AppData\Local\Microsoft\WindowsApps
6 | true | false | D:\Program Files\Microsoft VS Code\bin
7 | true | false | D:\Program Files\Fiddler
8 | true | false | D:\develop\gopath\bin
please choose one installation destination [default 0]: 0
gf binary is successfully installed to: D:\develop\go\bin
D:\17.gfcli> gf version
GoFrame CLI Tool v0.7.1, https://goframe.org
Install Path: D:\develop\go\bin\gf.exe
Build Detail:
Go Version: go1.14
GF Version: v1.12.1
Git Commit: 76483c62719736c36992edb7e4cea92c01ca6fc5
Build Time: 2020-04-01 21:46:21
D:\17.gfcli> gf up
checking...
downloading...
installing...
gf binary is now updated to the latest version
D:\17.gfcli> gf version
GoFrame CLI Tool v2.6.2, https://goframe.org
GoFrame Version: v2.6.2 in current go.mod
CLI Installed At: /Users/didi/project/gopath/bin/gf2
CLI Built Detail:
Go Version: go1.20.8
GF Version: v2.6.2
Git Commit: 2023-09-12 22:00:35 5219c5c37ed755ff5f717d6ec07c7a1951453991
Build Time: 2023-09-12 22:17:31
D:\17.gfcli>gf up
start upgrading version...
upgrading "github.com/gogf/gf/v2" from "v2.6.2" to "latest"
👏congratulations! you've upgraded to the latest version of GoFrame! enjoy it!👏