golangci(lint) : more linters (#2870)

This commit is contained in:
Matthieu MOREL
2021-09-21 09:22:21 +02:00
committed by GitHub
parent 3a6f18f32f
commit 71f7087097
7 changed files with 24 additions and 8 deletions

View File

@ -5,6 +5,7 @@
package binding
import (
"errors"
"net/http"
)
@ -22,7 +23,7 @@ func (formBinding) Bind(req *http.Request, obj interface{}) error {
if err := req.ParseForm(); err != nil {
return err
}
if err := req.ParseMultipartForm(defaultMemory); err != nil && err != http.ErrNotMultipart {
if err := req.ParseMultipartForm(defaultMemory); err != nil && !errors.Is(err, http.ErrNotMultipart) {
return err
}
if err := mapForm(obj, req.Form); err != nil {