fix(context): Copy() copies Errors and Accepted fields (#4695)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* Previously, Copy() only copied Keys and Params, leaving Errors and Accepted as nil even when set on the original context. Goroutines receiving a copied context could not observe errors attached before the copy, and content-negotiation state set by middleware was silently lost. * Replace assert.Equal(t, len(c.Errors), len(cp.Errors)) with assert.Len(t, cp.Errors, 2) to satisfy the testifylint linter rule ---------
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diff stats
2 files+54 added−0 removed
- other:+54 added−0 removed