Skip to content

Commit fb61fbe

Browse files
jevargaldas
authored andcommitted
Small typo errors
1 parent 645b0a5 commit fb61fbe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

website/content/guide/binding.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type User struct {
2727
}
2828
```
2929

30-
Request data is binded to the struct in given order:
30+
Request data is bound to the struct in given order:
3131

3232
1. Path parameters
3333
2. Query parameters (only for GET/DELETE methods)
@@ -37,11 +37,11 @@ Notes:
3737

3838
* For `query`, `param`, `form` **only** fields **with** tags are bound.
3939
* For `json` and `xml` can bind to *public* fields without tags but this is by their standard library implementation.
40-
* Each step can overwrite binded fields from the previous step. This means if your json request has query param
40+
* Each step can overwrite bound fields from the previous step. This means if your json request has query param
4141
`&name=query` and body is `{"name": "body"}` then the result will be `User{Name: "body"}`.
42-
* To avoid security flaws try to avoid passing binded structs directly to other methods if
42+
* To avoid security flaws try to avoid passing bound structs directly to other methods if
4343
these structs contain fields that should not be bindable. It is advisable to have separate struct for binding and map it
44-
explicitly to your business struct. Consider what will happen if your binded struct has public
44+
explicitly to your business struct. Consider what will happen if your bound struct has public
4545
field `IsAdmin bool` and request body would contain `{IsAdmin: true, Name: "hacker"}`.
4646
* When binding forms take note that Echo implementation uses standard library form parsing which parses form data
4747
from BOTH URL and BODY if content type is not MIMEMultipartForm. See documentation for [non-MIMEMultipartForm](https://golang.org/pkg/net/http/#Request.ParseForm)
@@ -83,7 +83,7 @@ e.POST("/users", func(c echo.Context) (err error) {
8383
if err = c.Bind(u); err != nil {
8484
return
8585
}
86-
// To avoid security flaws try to avoid passing binded structs directly to other methods
86+
// To avoid security flaws try to avoid passing bound structs directly to other methods
8787
// if these structs contain fields that should not be bindable.
8888
user := UserDTO{
8989
Name: u.Name,

0 commit comments

Comments
 (0)