We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aa0d21 commit 3841945Copy full SHA for 3841945
website/content/guide/binding.md
@@ -80,7 +80,7 @@ type User struct {
80
```go
81
e.POST("/users", func(c echo.Context) (err error) {
82
u := new(User)
83
- if err = c.Bind(u); err != nil {
+ if err := c.Bind(u); err != nil {
84
return
85
}
86
// To avoid security flaws try to avoid passing bound structs directly to other methods
@@ -195,7 +195,7 @@ type CustomBinder struct {}
195
func (cb *CustomBinder) Bind(i interface{}, c echo.Context) (err error) {
196
// You may use default binder
197
db := new(echo.DefaultBinder)
198
- if err = db.Bind(i, c); err != echo.ErrUnsupportedMediaType {
+ if err := db.Bind(i, c); err != echo.ErrUnsupportedMediaType {
199
200
201
0 commit comments