break generator when happen error (#192)
Co-authored-by: kim <xutao@xiaoheiban.cn>
This commit is contained in:
@@ -72,8 +72,9 @@ func genMain(dir string, api *spec.ApiSpec) error {
|
||||
"serviceName": api.Service.Name,
|
||||
})
|
||||
if err != nil {
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
formatCode := formatCode(buffer.String())
|
||||
_, err = fp.WriteString(formatCode)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user