Skip to content

Commit e3a00d7

Browse files
authored
cmd/gf: fix missing configuration file support for cli command pack/run/tpl/up (#3629)
1 parent bd8d046 commit e3a00d7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cmd/gf/internal/cmd/cmd_pack.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func init() {
6363
}
6464

6565
type cPackInput struct {
66-
g.Meta `name:"pack"`
66+
g.Meta `name:"pack" config:"gfcli.pack"`
6767
Src string `name:"SRC" arg:"true" v:"required" brief:"{cPackSrcBrief}"`
6868
Dst string `name:"DST" arg:"true" v:"required" brief:"{cPackDstBrief}"`
6969
Name string `name:"name" short:"n" brief:"{cPackNameBrief}"`

cmd/gf/internal/cmd/cmd_run.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func init() {
8181

8282
type (
8383
cRunInput struct {
84-
g.Meta `name:"run"`
84+
g.Meta `name:"run" config:"gfcli.run"`
8585
File string `name:"FILE" arg:"true" brief:"{cRunFileBrief}" v:"required"`
8686
Path string `name:"path" short:"p" brief:"{cRunPathBrief}" d:"./"`
8787
Extra string `name:"extra" short:"e" brief:"{cRunExtraBrief}"`

cmd/gf/internal/cmd/cmd_tpl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ gf tpl parse -p ./template -v values.json -o ./template.parsed
4747

4848
type (
4949
cTplParseInput struct {
50-
g.Meta `name:"parse" brief:"{cTplParseBrief}" eg:"{cTplParseEg}"`
50+
g.Meta `name:"parse" config:"gfcli.tpl.parse" brief:"{cTplParseBrief}" eg:"{cTplParseEg}"`
5151
Path string `name:"path" short:"p" brief:"template file or folder path" v:"required"`
5252
Pattern string `name:"pattern" short:"n" brief:"template file pattern when path is a folder, default is:*" d:"*"`
5353
Recursive bool `name:"recursive" short:"c" brief:"recursively parsing files if path is folder, default is:true" d:"true"`

cmd/gf/internal/cmd/cmd_up.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func init() {
4848
}
4949

5050
type cUpInput struct {
51-
g.Meta `name:"up" config:"gfcli.up"`
51+
g.Meta `name:"up" config:"gfcli.up"`
5252
All bool `name:"all" short:"a" brief:"upgrade both version and cli, auto fix codes" orphan:"true"`
5353
Cli bool `name:"cli" short:"c" brief:"also upgrade CLI tool" orphan:"true"`
5454
Fix bool `name:"fix" short:"f" brief:"auto fix codes(it only make sense if cli is to be upgraded)" orphan:"true"`

0 commit comments

Comments
 (0)