mirror of https://github.com/gin-gonic/gin.git
delete else keyword (#945)
This commit is contained in:
parent
53799774f4
commit
4a2b55037f
|
@ -48,19 +48,19 @@ var (
|
||||||
func Default(method, contentType string) Binding {
|
func Default(method, contentType string) Binding {
|
||||||
if method == "GET" {
|
if method == "GET" {
|
||||||
return Form
|
return Form
|
||||||
} else {
|
}
|
||||||
switch contentType {
|
|
||||||
case MIMEJSON:
|
switch contentType {
|
||||||
return JSON
|
case MIMEJSON:
|
||||||
case MIMEXML, MIMEXML2:
|
return JSON
|
||||||
return XML
|
case MIMEXML, MIMEXML2:
|
||||||
case MIMEPROTOBUF:
|
return XML
|
||||||
return ProtoBuf
|
case MIMEPROTOBUF:
|
||||||
case MIMEMSGPACK, MIMEMSGPACK2:
|
return ProtoBuf
|
||||||
return MsgPack
|
case MIMEMSGPACK, MIMEMSGPACK2:
|
||||||
default: //case MIMEPOSTForm, MIMEMultipartPOSTForm:
|
return MsgPack
|
||||||
return Form
|
default: //case MIMEPOSTForm, MIMEMultipartPOSTForm:
|
||||||
}
|
return Form
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue