1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

add an example for #1659

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-10-18 19:37:33 +03:00
parent 637f7aeea7
commit 7ab51805ba
4 changed files with 60 additions and 2 deletions

View File

@@ -2363,7 +2363,10 @@ func (ctx *Context) ReadParams(ptr interface{}) error {
// It binds dynamic path parameters and URL query parameters
// to the "ptr" pointer struct value.
// The struct fields may contain "url" or "param" binding tags.
// If a validator exists then it validates the result too.
// If a validator exists then it validates the result too.
//
// Note that if the registered route contains a tail path parameter
// it may override any URL queries.
func (ctx *Context) ReadURL(ptr interface{}) error {
values := make(map[string][]string, ctx.params.Len())
ctx.params.Visit(func(key string, value string) {