Copy returns a copy of the current context that can be safely used outside the request's scope. This have to be used then the context has to be passed to a goroutine.
c.Set("foo", "bar") cp := c.Copy() assert.Nil(t, cp.handlers) assert.Nil(t, cp.writermem.ResponseWriter)
Copy is referenced in 3 repositoriesgithub.com/gin-gonic/gin
- 1 reference in context_test.go
- 4 references in c/conversation.go