From 458bcb97717a2f05a0bd607770c1be7675f57a20 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Tue, 4 Jun 2024 17:19:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dgf=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E6=B2=A1=E6=9C=89=E9=85=8D=E7=BD=AEconfig?= =?UTF-8?q?=E7=9A=84key=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/gf/internal/cmd/cmd_pack.go | 2 +- cmd/gf/internal/cmd/cmd_run.go | 2 +- cmd/gf/internal/cmd/cmd_tpl.go | 2 +- cmd/gf/internal/cmd/cmd_up.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/gf/internal/cmd/cmd_pack.go b/cmd/gf/internal/cmd/cmd_pack.go index 6c9d555d17b..a4472f12c2c 100644 --- a/cmd/gf/internal/cmd/cmd_pack.go +++ b/cmd/gf/internal/cmd/cmd_pack.go @@ -63,7 +63,7 @@ func init() { } type cPackInput struct { - g.Meta `name:"pack"` + g.Meta `name:"pack" config:"gfcli.pack"` Src string `name:"SRC" arg:"true" v:"required" brief:"{cPackSrcBrief}"` Dst string `name:"DST" arg:"true" v:"required" brief:"{cPackDstBrief}"` Name string `name:"name" short:"n" brief:"{cPackNameBrief}"` diff --git a/cmd/gf/internal/cmd/cmd_run.go b/cmd/gf/internal/cmd/cmd_run.go index 5f242abbd10..95031cbbf7e 100644 --- a/cmd/gf/internal/cmd/cmd_run.go +++ b/cmd/gf/internal/cmd/cmd_run.go @@ -81,7 +81,7 @@ func init() { type ( cRunInput struct { - g.Meta `name:"run"` + g.Meta `name:"run" config:"gfcli.run"` File string `name:"FILE" arg:"true" brief:"{cRunFileBrief}" v:"required"` Path string `name:"path" short:"p" brief:"{cRunPathBrief}" d:"./"` Extra string `name:"extra" short:"e" brief:"{cRunExtraBrief}"` diff --git a/cmd/gf/internal/cmd/cmd_tpl.go b/cmd/gf/internal/cmd/cmd_tpl.go index 8ad833df3f2..8d42490870a 100644 --- a/cmd/gf/internal/cmd/cmd_tpl.go +++ b/cmd/gf/internal/cmd/cmd_tpl.go @@ -47,7 +47,7 @@ gf tpl parse -p ./template -v values.json -o ./template.parsed type ( cTplParseInput struct { - g.Meta `name:"parse" brief:"{cTplParseBrief}" eg:"{cTplParseEg}"` + g.Meta `name:"parse" config:"gfcli.tpl.parse" brief:"{cTplParseBrief}" eg:"{cTplParseEg}"` Path string `name:"path" short:"p" brief:"template file or folder path" v:"required"` Pattern string `name:"pattern" short:"n" brief:"template file pattern when path is a folder, default is:*" d:"*"` Recursive bool `name:"recursive" short:"c" brief:"recursively parsing files if path is folder, default is:true" d:"true"` diff --git a/cmd/gf/internal/cmd/cmd_up.go b/cmd/gf/internal/cmd/cmd_up.go index c26c636ca99..ab9963bd8c4 100644 --- a/cmd/gf/internal/cmd/cmd_up.go +++ b/cmd/gf/internal/cmd/cmd_up.go @@ -48,7 +48,7 @@ func init() { } type cUpInput struct { - g.Meta `name:"up" config:"gfcli.up"` + g.Meta `name:"up" config:"gfcli.up"` All bool `name:"all" short:"a" brief:"upgrade both version and cli, auto fix codes" orphan:"true"` Cli bool `name:"cli" short:"c" brief:"also upgrade CLI tool" orphan:"true"` Fix bool `name:"fix" short:"f" brief:"auto fix codes(it only make sense if cli is to be upgraded)" orphan:"true"`