This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 575
Replace schema package #335
Milestone
Comments
@markbates are you working on this one ? (looking for something for my next week :) ) |
I started on it ages ago, but never finished. I'll push my branch this weekend for you. |
@apaganobeleno i thought i had a branch, but it doesn't appear i do. sorry. i do have some code from an app that is use formam/buffalo. hopefully that will help a bit. buffalo.RegisterBinder("application/x-www-form-urlencoded", func(req *http.Request, i interface{}) error {
err := req.ParseForm()
if err != nil {
return errors.WithStack(err)
}
dec := formam.NewDecoder(&formam.DecoderOptions{TagName: "formam"})
if err := dec.Decode(req.Form, i); err != nil {
return errors.WithStack(err)
}
return nil
}) |
@markbates oh yes, this is at least half of the work :), i'll keep you posted. |
@markbates i think we're all set on this one, right ? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We have been using http://www.gorillatoolkit.org/pkg/schema for the binding of HTML forms to models, however, I have run into issues using it. For example, it doesn't allow for the binding of maps to a field.
During my travels I found the following package which looks quite promising and seems to do all we need it to do:
https://github.com/monoculum/formam
This is everyone's chance to weigh in on this change.
The text was updated successfully, but these errors were encountered: