mirror of
https://github.com/gin-gonic/gin.git
synced 2025-04-06 03:57:46 +08:00
fix context error
This commit is contained in:
parent
8763f33c65
commit
043b245931
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user