fix context error

This commit is contained in:
ljluestc 2025-03-23 20:49:53 -07:00
parent 8763f33c65
commit 043b245931

View File

@ -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
}