From c964ad370bbe007f1b18a7570f058a66f05fbe1f Mon Sep 17 00:00:00 2001 From: Name <1911860538@qq.com> Date: Mon, 1 Apr 2024 12:58:01 +0800 Subject: [PATCH] chore(optimize): the ShouldBindUri method of the Context struct (#3911) Co-authored-by: huangzw --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index afc3c353e1..391adafed0 100644 --- a/context.go +++ b/context.go @@ -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} }