use http method constant (#2155)

* use http method constant

* fix typo
This commit is contained in:
thinkerou
2019-11-29 07:50:49 +08:00
committed by GitHub
parent 352d69c71f
commit d5f12ac6d7
8 changed files with 369 additions and 369 deletions

View File

@ -84,7 +84,7 @@ var (
// Default returns the appropriate Binding instance based on the HTTP method
// and the content type.
func Default(method, contentType string) Binding {
if method == "GET" {
if method == http.MethodGet {
return Form
}