del unnecessary blank

master
raymonder jin 2 years ago committed by Kevin Wan
parent a5e5f04bcf
commit ace125f189

@ -20,9 +20,9 @@
> ***注意:*** > ***注意:***
> >
> 从 v1.3.0 之前版本升级请执行以下命令: > 从 v1.3.0 之前版本升级请执行以下命令:
> >
> `GOPROXY=https://goproxy.cn/,direct go install github.com/zeromicro/go-zero/tools/goctl@latest` > `GOPROXY=https://goproxy.cn/,direct go install github.com/zeromicro/go-zero/tools/goctl@latest`
> >
> `goctl migrate —verbose —version v1.4.3` > `goctl migrate —verbose —version v1.4.3`
## 0. go-zero 介绍 ## 0. go-zero 介绍
@ -121,10 +121,10 @@ GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/zeromicro
```shell ```shell
# Go 1.15 及之前版本 # Go 1.15 及之前版本
GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/zeromicro/go-zero/tools/goctl@latest GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/zeromicro/go-zero/tools/goctl@latest
# Go 1.16 及以后版本 # Go 1.16 及以后版本
GOPROXY=https://goproxy.cn/,direct go install github.com/zeromicro/go-zero/tools/goctl@latest GOPROXY=https://goproxy.cn/,direct go install github.com/zeromicro/go-zero/tools/goctl@latest
# For Mac # For Mac
brew install goctl brew install goctl
@ -200,7 +200,7 @@ GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/zeromicro
* [快速构建高并发微服务 - 多 RPC 版](https://github.com/zeromicro/zero-doc/blob/main/docs/zero/bookstore.md) * [快速构建高并发微服务 - 多 RPC 版](https://github.com/zeromicro/zero-doc/blob/main/docs/zero/bookstore.md)
* [goctl 使用帮助](https://github.com/zeromicro/zero-doc/blob/main/doc/goctl.md) * [goctl 使用帮助](https://github.com/zeromicro/zero-doc/blob/main/doc/goctl.md)
* [Examples](https://github.com/zeromicro/zero-examples) * [Examples](https://github.com/zeromicro/zero-examples)
* 精选 `goctl` 插件 * 精选 `goctl` 插件
| 插件 | 用途 | | 插件 | 用途 |

@ -129,10 +129,10 @@ goctl migrate —verbose —version v1.4.3
```shell ```shell
# for Go 1.15 and earlier # for Go 1.15 and earlier
GO111MODULE=on go get -u github.com/zeromicro/go-zero/tools/goctl@latest GO111MODULE=on go get -u github.com/zeromicro/go-zero/tools/goctl@latest
# for Go 1.16 and later # for Go 1.16 and later
go install github.com/zeromicro/go-zero/tools/goctl@latest go install github.com/zeromicro/go-zero/tools/goctl@latest
# For Mac # For Mac
brew install goctl brew install goctl
@ -156,24 +156,24 @@ goctl migrate —verbose —version v1.4.3
Request { Request {
Name string `path:"name,options=[you,me]"` // parameters are auto validated Name string `path:"name,options=[you,me]"` // parameters are auto validated
} }
Response { Response {
Message string `json:"message"` Message string `json:"message"`
} }
) )
service greet-api { service greet-api {
@handler GreetHandler @handler GreetHandler
get /greet/from/:name(Request) returns (Response) get /greet/from/:name(Request) returns (Response)
} }
``` ```
the .api files also can be generated by goctl, like below: the .api files also can be generated by goctl, like below:
```shell ```shell
goctl api -o greet.api goctl api -o greet.api
``` ```
4. generate the go server-side code 4. generate the go server-side code
```shell ```shell

Loading…
Cancel
Save