mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 18:30:02 +08:00
docs: update goctl markdown (#1370)
This commit is contained in:
@@ -140,7 +140,6 @@ service user-api {
|
||||
`goctl api go -api user/user.api -dir user`
|
||||
|
||||
```Plain Text
|
||||
|
||||
.
|
||||
├── internal
|
||||
│ ├── config
|
||||
@@ -167,7 +166,6 @@ service user-api {
|
||||
│ └── types
|
||||
│ └── types.go
|
||||
└── user.go
|
||||
|
||||
```
|
||||
|
||||
生成的代码可以直接跑,有几个地方需要改:
|
||||
@@ -178,13 +176,13 @@ service user-api {
|
||||
#### 根据定义好的api文件生成java代码
|
||||
|
||||
```Plain Text
|
||||
goctl api java -api user/user.api -dir ./src
|
||||
goctl api java -api user/user.api -dir ./src
|
||||
```
|
||||
|
||||
#### 根据定义好的api文件生成typescript代码
|
||||
|
||||
```Plain Text
|
||||
goctl api ts -api user/user.api -dir ./src -webapi ***
|
||||
goctl api ts -api user/user.api -dir ./src -webapi ***
|
||||
```
|
||||
|
||||
ts需要指定webapi所在目录
|
||||
@@ -192,5 +190,5 @@ ts需要指定webapi所在目录
|
||||
#### 根据定义好的api文件生成Dart代码
|
||||
|
||||
```Plain Text
|
||||
goctl api dart -api user/user.api -dir ./src
|
||||
goctl api dart -api user/user.api -dir ./src
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user