Skip to content

Commit c964ad3

Browse files
1911860538huangzw
and
huangzw
authored
chore(optimize): the ShouldBindUri method of the Context struct (#3911)
Co-authored-by: huangzw <[email protected]>
1 parent 7a865dc commit c964ad3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

context.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ func (c *Context) ShouldBindHeader(obj any) error {
739739

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

0 commit comments

Comments
 (0)