docs: update goctl markdown (#1370)
This commit is contained in:
@@ -140,34 +140,32 @@ 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
|
│ │ └── config.go
|
||||||
│ │ └── config.go
|
│ ├── handler
|
||||||
│ ├── handler
|
│ │ ├── pinghandler.go
|
||||||
│ │ ├── pinghandler.go
|
│ │ ├── profile
|
||||||
│ │ ├── profile
|
│ │ │ ├── createprofilehandler.go
|
||||||
│ │ │ ├── createprofilehandler.go
|
│ │ │ └── getprofilehandler.go
|
||||||
│ │ │ └── getprofilehandler.go
|
│ │ ├── routes.go
|
||||||
│ │ ├── routes.go
|
│ │ └── user
|
||||||
│ │ └── user
|
│ │ ├── createuserhandler.go
|
||||||
│ │ ├── createuserhandler.go
|
│ │ └── getuserhandler.go
|
||||||
│ │ └── getuserhandler.go
|
│ ├── logic
|
||||||
│ ├── logic
|
│ │ ├── pinglogic.go
|
||||||
│ │ ├── pinglogic.go
|
│ │ ├── profile
|
||||||
│ │ ├── profile
|
│ │ │ ├── createprofilelogic.go
|
||||||
│ │ │ ├── createprofilelogic.go
|
│ │ │ └── getprofilelogic.go
|
||||||
│ │ │ └── getprofilelogic.go
|
│ │ └── user
|
||||||
│ │ └── user
|
│ │ ├── createuserlogic.go
|
||||||
│ │ ├── createuserlogic.go
|
│ │ └── getuserlogic.go
|
||||||
│ │ └── getuserlogic.go
|
│ ├── svc
|
||||||
│ ├── svc
|
│ │ └── servicecontext.go
|
||||||
│ │ └── servicecontext.go
|
│ └── 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
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user