Przeglądaj źródła

Removes unused underscore

Manu Mtz-Almeida 10 lat temu
rodzic
commit
0494e1b66a
3 zmienionych plików z 10 dodań i 10 usunięć
  1. 6 6
      binding/form.go
  2. 2 2
      binding/json.go
  3. 2 2
      binding/xml.go

+ 6 - 6
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
 	}

+ 2 - 2
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

+ 2 - 2
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