From 0494e1b66aaaf7a690c42a082e2864e8813649da Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Fri, 10 Jul 2015 13:06:01 +0200 Subject: [PATCH] Removes unused underscore --- binding/form.go | 12 ++++++------ binding/json.go | 4 ++-- binding/xml.go | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/binding/form.go b/binding/form.go index 2e26c0a..557333e 100644 --- a/binding/form.go +++ b/binding/form.go @@ -10,11 +10,11 @@ type formBinding struct{} type formPostBinding struct{} type formMultipartBinding struct{} -func (_ formBinding) Name() string { +func (formBinding) Name() string { return "form" } -func (_ formBinding) Bind(req *http.Request, obj interface{}) error { +func (formBinding) Bind(req *http.Request, obj interface{}) error { if err := req.ParseForm(); err != nil { return err } @@ -25,11 +25,11 @@ func (_ formBinding) Bind(req *http.Request, obj interface{}) error { return validate(obj) } -func (_ formPostBinding) Name() string { +func (formPostBinding) Name() string { return "form-urlencoded" } -func (_ formPostBinding) Bind(req *http.Request, obj interface{}) error { +func (formPostBinding) Bind(req *http.Request, obj interface{}) error { if err := req.ParseForm(); err != nil { return err } @@ -39,11 +39,11 @@ func (_ formPostBinding) Bind(req *http.Request, obj interface{}) error { return validate(obj) } -func (_ formMultipartBinding) Name() string { +func (formMultipartBinding) Name() string { return "multipart/form-data" } -func (_ formMultipartBinding) Bind(req *http.Request, obj interface{}) error { +func (formMultipartBinding) Bind(req *http.Request, obj interface{}) error { if err := req.ParseMultipartForm(32 << 10); err != nil { return err } diff --git a/binding/json.go b/binding/json.go index 25c5a06..6e53244 100644 --- a/binding/json.go +++ b/binding/json.go @@ -12,11 +12,11 @@ import ( type jsonBinding struct{} -func (_ jsonBinding) Name() string { +func (jsonBinding) Name() string { return "json" } -func (_ jsonBinding) Bind(req *http.Request, obj interface{}) error { +func (jsonBinding) Bind(req *http.Request, obj interface{}) error { decoder := json.NewDecoder(req.Body) if err := decoder.Decode(obj); err != nil { return err diff --git a/binding/xml.go b/binding/xml.go index cac4be8..f84a6b7 100644 --- a/binding/xml.go +++ b/binding/xml.go @@ -11,11 +11,11 @@ import ( type xmlBinding struct{} -func (_ xmlBinding) Name() string { +func (xmlBinding) Name() string { return "xml" } -func (_ xmlBinding) Bind(req *http.Request, obj interface{}) error { +func (xmlBinding) Bind(req *http.Request, obj interface{}) error { decoder := xml.NewDecoder(req.Body) if err := decoder.Decode(obj); err != nil { return err