From f5d62a6a182f51f3dfb16768acf8904929be743d Mon Sep 17 00:00:00 2001 From: kataras Date: Tue, 29 Aug 2017 13:13:52 +0300 Subject: [PATCH] create a gopkg.toml manually in order to resolve https://github.com/kataras/iris/issues/731 Former-commit-id: c9ad41b73ff0338429fe69cd083a1daf684c8e40 --- Gopkg.toml | 91 ++++++++++++++++++++++++++++++++++++++++++++++ context/context.go | 6 +-- 2 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 Gopkg.toml diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 00000000..024a75bb --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,91 @@ +[[constraint]] + name = "github.com/BurntSushi/toml" + version = "0.3.0" + +[[constraint]] + branch = "master" + name = "github.com/Joker/jade" + +[[constraint]] + branch = "master" + name = "github.com/Unknwon/i18n" + +[[constraint]] + branch = "master" + name = "github.com/aymerick/raymond" + +[[constraint]] + name = "github.com/boltdb/bolt" + version = "3.3.3" + +[[constraint]] + branch = "master" + name = "github.com/eknkc/amber" + +[[constraint]] + name = "github.com/fatih/structs" + version = "1.0.0" + +[[constraint]] + branch = "master" + name = "github.com/flosch/pongo2" + +[[constraint]] + branch = "master" + name = "github.com/garyburd/redigo" + +[[constraint]] + name = "github.com/gorilla/websocket" + version = "1.2.0" + +[[constraint]] + branch = "master" + name = "github.com/iris-contrib/form-binder" + +[[constraint]] + branch = "master" + name = "github.com/iris-contrib/httpexpect" + +[[constraint]] + branch = "master" + name = "github.com/json-iterator/go" + +[[constraint]] + branch = "master" + name = "github.com/kataras/golog" + +[[constraint]] + name = "github.com/klauspost/compress" + version = "1.2.1" + +[[constraint]] + branch = "master" + name = "github.com/microcosm-cc/bluemonday" + +[[constraint]] + name = "github.com/russross/blackfriday" + version = "2.0.0" + +[[constraint]] + branch = "master" + name = "github.com/ryanuber/columnize" + +[[constraint]] + branch = "master" + name = "github.com/satori/go.uuid" + +[[constraint]] + branch = "master" + name = "github.com/syndtr/goleveldb" + +[[constraint]] + branch = "master" + name = "github.com/valyala/bytebufferpool" + +[[constraint]] + branch = "master" + name = "golang.org/x/crypto" + +[[constraint]] + branch = "v2" + name = "gopkg.in/yaml.v2" diff --git a/context/context.go b/context/context.go index 90ad3a78..5e4879b9 100644 --- a/context/context.go +++ b/context/context.go @@ -23,9 +23,9 @@ import ( "time" "github.com/fatih/structs" + "github.com/iris-contrib/form-binder" "github.com/json-iterator/go" "github.com/microcosm-cc/bluemonday" - "github.com/monoculum/formam" "github.com/russross/blackfriday" "github.com/kataras/iris/core/errors" @@ -1450,10 +1450,10 @@ func (ctx *context) ReadForm(formObject interface{}) error { return errors.New("An empty form passed on ReadForm") } - // or dec := formam.NewDecoder(&formam.DecoderOptions{TagName: "form"}) + // or dec := formbinder.NewDecoder(&formbinder.DecoderOptions{TagName: "form"}) // somewhere at the app level. I did change the tagName to "form" // inside its source code, so it's not needed for now. - return errReadBody.With(formam.Decode(values, formObject)) + return errReadBody.With(formbinder.Decode(values, formObject)) } // +------------------------------------------------------------+