add fast create api demo service (#59)

* rebase upstream

* rebase

* trim no need line

* trim no need line

* trim no need line

* add fast create api demo: goctl api new

* refactor

* refactor

Co-authored-by: kingxt <dream4kingxt@163.com>
This commit is contained in:
kingxt
2020-09-11 15:27:35 +08:00
committed by GitHub
parent 17e6cfb7a9
commit 1c3c8f4bbc
3 changed files with 68 additions and 0 deletions

View File

@@ -36,6 +36,10 @@ func GoCommand(c *cli.Context) error {
return errors.New("missing -dir")
}
return DoGenProject(apiFile, dir)
}
func DoGenProject(apiFile, dir string) error {
p, err := parser.NewParser(apiFile)
if err != nil {
return err