chore(optimize): the ShouldBindUri method of the Context struct (#3911)

Co-authored-by: huangzw <huangzw@hsmap.com>
This commit is contained in:
Name 2024-04-01 12:58:01 +08:00 committed by GitHub
parent 7a865dcf1d
commit c964ad370b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -739,7 +739,7 @@ func (c *Context) ShouldBindHeader(obj any) error {
// ShouldBindUri binds the passed struct pointer using the specified binding engine.
func (c *Context) ShouldBindUri(obj any) error {
m := make(map[string][]string)
m := make(map[string][]string, len(c.Params))
for _, v := range c.Params {
m[v.Key] = []string{v.Value}
}