1
0
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:
Vishal Rana 2017-08-03 07:52:47 -07:00
parent b42edd791f
commit 2b6ea65ccd

View File

@ -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):