goctl add stdin flag (#170)

* add stdin flag to use stdin receive api doc and use stdout output formatted result

* optimize code and output error through stderr

* fix mistake

* add dir parameter legality verify
This commit is contained in:
codingfanlt
2020-10-28 22:37:59 +08:00
committed by GitHub
parent 033525fea8
commit a13b48c33e
3 changed files with 73 additions and 35 deletions

View File

@@ -66,7 +66,7 @@ func DoGenProject(apiFile, dir string, force bool) error {
return err
}
if err = apiformat.ApiFormat(apiFile, false); err != nil {
if err := apiformat.ApiFormatByPath(apiFile); err != nil {
return err
}