-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom struct tag #2719
Comments
mtt0
added a commit
to mtt0/gin
that referenced
this issue
May 14, 2021
Add function `binding.MapFormWithTag` (gin-gonic#2719)
mtt0
added a commit
to mtt0/gin
that referenced
this issue
May 14, 2021
Add 'Bind form-data request with custom struct and custom tag' section (gin-gonic#2719)
mtt0
added a commit
to mtt0/gin
that referenced
this issue
Jun 25, 2021
Add 'Bind form-data request with custom struct and custom tag' section (gin-gonic#2719)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Many golang packages have their own struct type and tags, we can not bind their type by
binding
directly. For example:go-gitlab use
url
as struct field tag:https://github.com/xanzy/go-gitlab/blob/3ce8ea8933fa3f8cdbd0ec1205392417d4ba4701/pipelines.go#L149-L162
so, we can not do this:
How to solve
bind.MapFormWithTag
form_mapping.go:
Now we can do this:
The text was updated successfully, but these errors were encountered: