mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
update vendor/ dir to latest w/o heroku, moby
had to lock a lot of things in place
This commit is contained in:
11
vendor/github.com/gin-gonic/gin/binding/json.go
generated
vendored
11
vendor/github.com/gin-gonic/gin/binding/json.go
generated
vendored
@@ -5,9 +5,13 @@
|
||||
package binding
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin/json"
|
||||
)
|
||||
|
||||
var (
|
||||
EnableDecoderUseNumber = false
|
||||
)
|
||||
|
||||
type jsonBinding struct{}
|
||||
@@ -18,6 +22,9 @@ func (jsonBinding) Name() string {
|
||||
|
||||
func (jsonBinding) Bind(req *http.Request, obj interface{}) error {
|
||||
decoder := json.NewDecoder(req.Body)
|
||||
if EnableDecoderUseNumber {
|
||||
decoder.UseNumber()
|
||||
}
|
||||
if err := decoder.Decode(obj); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user