Skip to content

Commit e3bf714

Browse files
committed
fix
1 parent eaa716c commit e3bf714

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

internal/cmd.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ func (e *Executor) Run(cmd *Args) error {
103103
output.Variables[k] = v
104104
}
105105

106+
if output.Ignore {
107+
continue
108+
}
109+
106110
writer := newWriter(name, e.env)
107111
engine, err := tmpl.NewEngine(e.env.Lang, name, output.Template, output.Variables)
108112
if err != nil {

tmpl/doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type Path struct {
2828
type Output struct {
2929
Header []string `json:"header,omitempty"` //文件头信息
3030
File string `json:"file,omitempty"` //文件地址
31+
Ignore bool `json:"ignore,omitempty"` //忽略生成
3132
Template string `json:"template,omitempty"` //模版文件
3233
Variables map[string]string `json:"variables,omitempty"` //变量集
3334
}

0 commit comments

Comments
 (0)