ShouldBindUri binds the passed struct pointer using the specified binding engine. It works like ShouldBindJSON but binds parameters from the URI.
(obj any)
| 907 | // ShouldBindUri binds the passed struct pointer using the specified binding engine. |
| 908 | // It works like ShouldBindJSON but binds parameters from the URI. |
| 909 | func (c *Context) ShouldBindUri(obj any) error { |
| 910 | m := make(map[string][]string, len(c.Params)) |
| 911 | for _, v := range c.Params { |
| 912 | m[v.Key] = []string{v.Value} |
| 913 | } |
| 914 | return binding.Uri.BindUri(m, obj) |
| 915 | } |
| 916 | |
| 917 | // ShouldBindWith binds the passed struct pointer using the specified binding engine. |
| 918 | // See the binding package. |