mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
Removed duplicated code in binder
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
b42edd791f
commit
2b6ea65ccd
3
bind.go
3
bind.go
@ -42,9 +42,6 @@ func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) {
|
||||
if err = b.bindPathData(i, c); err != nil {
|
||||
return NewHTTPError(http.StatusBadRequest, err.Error())
|
||||
}
|
||||
if err = b.bindPathData(i, c); err != nil {
|
||||
return NewHTTPError(http.StatusBadRequest, err.Error())
|
||||
}
|
||||
ctype := req.Header.Get(HeaderContentType)
|
||||
switch {
|
||||
case strings.HasPrefix(ctype, MIMEApplicationJSON):
|
||||
|
Loading…
Reference in New Issue
Block a user