mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-07 04:38:19 +08:00
docs: fix grammar and typos in documentation
- Fix 'detail information' to 'detailed information' (6 occurrences) - Fix 'binded' to 'bound' in comment - Fix 'The follow example using' to 'The following example uses' - Fix 'to Generates' to 'to Generate' in AsciiJSON section - Fix redundant 'command' in 'Using the command curl command result'
This commit is contained in:
parent
5f4f964325
commit
8e7c3efdc3
20
docs/doc.md
20
docs/doc.md
@ -108,7 +108,7 @@ Gin enables `MsgPack` rendering feature by default. But you can disable this fea
|
|||||||
go build -tags=nomsgpack .
|
go build -tags=nomsgpack .
|
||||||
```
|
```
|
||||||
|
|
||||||
This is useful to reduce the binary size of executable files. See the [detail information](https://github.com/gin-gonic/gin/pull/1852).
|
This is useful to reduce the binary size of executable files. See the [detailed information](https://github.com/gin-gonic/gin/pull/1852).
|
||||||
|
|
||||||
## Routing
|
## Routing
|
||||||
|
|
||||||
@ -944,7 +944,7 @@ import (
|
|||||||
"github.com/go-playground/validator/v10"
|
"github.com/go-playground/validator/v10"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Booking contains binded and validated data.
|
// Booking contains bound and validated data.
|
||||||
type Booking struct {
|
type Booking struct {
|
||||||
CheckIn time.Time `form:"check_in" binding:"required,bookabledate" time_format:"2006-01-02"`
|
CheckIn time.Time `form:"check_in" binding:"required,bookabledate" time_format:"2006-01-02"`
|
||||||
CheckOut time.Time `form:"check_out" binding:"required,gtfield=CheckIn" time_format:"2006-01-02"`
|
CheckOut time.Time `form:"check_out" binding:"required,gtfield=CheckIn" time_format:"2006-01-02"`
|
||||||
@ -998,7 +998,7 @@ See the [struct-lvl-validation example](https://github.com/gin-gonic/examples/tr
|
|||||||
|
|
||||||
### Only Bind Query String
|
### Only Bind Query String
|
||||||
|
|
||||||
`ShouldBindQuery` function only binds the query params and not the post data. See the [detail information](https://github.com/gin-gonic/gin/issues/742#issuecomment-315953017).
|
`ShouldBindQuery` function only binds the query params and not the post data. See the [detailed information](https://github.com/gin-gonic/gin/issues/742#issuecomment-315953017).
|
||||||
|
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
@ -1035,7 +1035,7 @@ func startPage(c *gin.Context) {
|
|||||||
|
|
||||||
### Bind Query String or Post Data
|
### Bind Query String or Post Data
|
||||||
|
|
||||||
See the [detail information](https://github.com/gin-gonic/gin/issues/742#issuecomment-264681292).
|
See the [detailed information](https://github.com/gin-gonic/gin/issues/742#issuecomment-264681292).
|
||||||
|
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
@ -1191,7 +1191,7 @@ curl -X GET "localhost:8085/testing?name=appleboy&addresses=foo,bar&birthday=199
|
|||||||
|
|
||||||
### Bind Uri
|
### Bind Uri
|
||||||
|
|
||||||
See the [detail information](https://github.com/gin-gonic/gin/issues/846).
|
See the [detailed information](https://github.com/gin-gonic/gin/issues/846).
|
||||||
|
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
@ -1379,7 +1379,7 @@ func main() {
|
|||||||
|
|
||||||
### Bind HTML checkboxes
|
### Bind HTML checkboxes
|
||||||
|
|
||||||
See the [detail information](https://github.com/gin-gonic/gin/issues/129#issuecomment-124260092)
|
See the [detailed information](https://github.com/gin-gonic/gin/issues/129#issuecomment-124260092)
|
||||||
|
|
||||||
main.go
|
main.go
|
||||||
|
|
||||||
@ -1469,7 +1469,7 @@ curl -X POST -v --form name=user --form "avatar=@./avatar.png" http://localhost:
|
|||||||
|
|
||||||
### Bind form-data request with custom struct
|
### Bind form-data request with custom struct
|
||||||
|
|
||||||
The follow example using custom struct:
|
The following example uses a custom struct:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
type StructA struct {
|
type StructA struct {
|
||||||
@ -1530,7 +1530,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Using the command `curl` command result:
|
Using the `curl` command result:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ curl "http://localhost:8080/getb?field_a=hello&field_b=world"
|
$ curl "http://localhost:8080/getb?field_a=hello&field_b=world"
|
||||||
@ -1770,7 +1770,7 @@ func main() {
|
|||||||
|
|
||||||
#### AsciiJSON
|
#### AsciiJSON
|
||||||
|
|
||||||
Using AsciiJSON to Generates ASCII-only JSON with escaped non-ASCII characters.
|
Using AsciiJSON to Generate ASCII-only JSON with escaped non-ASCII characters.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
func main() {
|
func main() {
|
||||||
@ -2413,7 +2413,7 @@ func main() {
|
|||||||
|
|
||||||
### http2 server push
|
### http2 server push
|
||||||
|
|
||||||
http.Pusher is supported only **go1.8+**. See the [golang blog](https://go.dev/blog/h2push) for detail information.
|
http.Pusher is supported only **go1.8+**. See the [golang blog](https://go.dev/blog/h2push) for detailed information.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user