simplify type definition in readme (#896)

* better text rendering

* simplify type definition in readme
master
Phibe 3 years ago committed by GitHub
parent 54d57c7d4b
commit d20cf56a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -112,13 +112,15 @@ go get -u github.com/tal-tech/go-zero
2. create the API file, like greet.api, you can install the plugin of goctl in vs code, api syntax is supported.
```go
type Request struct {
type (
Request {
Name string `path:"name,options=you|me"` // parameters are auto validated
}
type Response struct {
Response {
Message string `json:"message"`
}
)
service greet-api {
@handler GreetHandler

Loading…
Cancel
Save