docs: update goctl markdown (#1370)

This commit is contained in:
Kevin Wan
2021-12-26 20:32:31 +08:00
committed by GitHub
parent c0647f0719
commit 1d223fc114

View File

@@ -140,7 +140,6 @@ service user-api {
`goctl api go -api user/user.api -dir user` `goctl api go -api user/user.api -dir user`
```Plain Text ```Plain Text
. .
├── internal ├── internal
│   ├── config │   ├── config
@@ -167,7 +166,6 @@ service user-api {
│   └── types │   └── types
│   └── types.go │   └── types.go
└── user.go └── user.go
``` ```
生成的代码可以直接跑,有几个地方需要改: 生成的代码可以直接跑,有几个地方需要改:
@@ -178,13 +176,13 @@ service user-api {
#### 根据定义好的api文件生成java代码 #### 根据定义好的api文件生成java代码
```Plain Text ```Plain Text
goctl api java -api user/user.api -dir ./src goctl api java -api user/user.api -dir ./src
``` ```
#### 根据定义好的api文件生成typescript代码 #### 根据定义好的api文件生成typescript代码
```Plain Text ```Plain Text
goctl api ts -api user/user.api -dir ./src -webapi *** goctl api ts -api user/user.api -dir ./src -webapi ***
``` ```
ts需要指定webapi所在目录 ts需要指定webapi所在目录
@@ -192,5 +190,5 @@ ts需要指定webapi所在目录
#### 根据定义好的api文件生成Dart代码 #### 根据定义好的api文件生成Dart代码
```Plain Text ```Plain Text
goctl api dart -api user/user.api -dir ./src goctl api dart -api user/user.api -dir ./src
``` ```