break generator when happen error (#192)

Co-authored-by: kim <xutao@xiaoheiban.cn>
This commit is contained in:
kingxt
2020-11-07 21:25:52 +08:00
committed by GitHub
parent 57079bf4a4
commit 12327fa07d
8 changed files with 18 additions and 11 deletions

View File

@@ -55,6 +55,7 @@ func genEtc(dir string, api *spec.ApiSpec) error {
if err != nil {
return err
}
formatCode := formatCode(buffer.String())
_, err = fp.WriteString(formatCode)
return err