mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
feat(binding): support custom struct tag
Add function `binding.MapFormWithTag` (#2719)
This commit is contained in:
parent
4fe5f3e4b4
commit
85db5b48fe
@ -26,6 +26,10 @@ func mapForm(ptr interface{}, form map[string][]string) error {
|
||||
return mapFormByTag(ptr, form, "form")
|
||||
}
|
||||
|
||||
func MapFormWithTag(ptr interface{}, form map[string][]string, tag string) error {
|
||||
return mapFormByTag(ptr, form, tag)
|
||||
}
|
||||
|
||||
var emptyField = reflect.StructField{}
|
||||
|
||||
func mapFormByTag(ptr interface{}, form map[string][]string, tag string) error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user