From 043b2459316a55f7f6a6ebe84555809ce36da0c4 Mon Sep 17 00:00:00 2001 From: ljluestc Date: Sun, 23 Mar 2025 20:49:53 -0700 Subject: [PATCH] fix context error --- context.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/context.go b/context.go index 1c76c0f6..a6b77075 100644 --- a/context.go +++ b/context.go @@ -140,6 +140,15 @@ func (c *Context) Copy() *Context { cp.Params = make([]Param, len(cParams)) copy(cp.Params, cParams) + cErrors := c.Errors + cp.Errors = make(errorMsgs, len(cErrors)) + for i, e := range cErrors { + cp.Errors[i] = &Error{ + Err: e.Err, + Type: e.Type, + Meta: e.Meta, + } + } return &cp }