TestRaceContextCopy() — gin Function Reference
Architecture documentation for the TestRaceContextCopy() function in githubapi_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD e2c6531e_c64a_1e84_8276_85229cee8b6f["TestRaceContextCopy()"] 851931d7_59a3_9c02_f8d4_6771ae5af6e6["githubapi_test.go"] e2c6531e_c64a_1e84_8276_85229cee8b6f -->|defined in| 851931d7_59a3_9c02_f8d4_6771ae5af6e6 2773e3ff_5702_99c9_71be_e5245272540c["readWriteKeys()"] e2c6531e_c64a_1e84_8276_85229cee8b6f -->|calls| 2773e3ff_5702_99c9_71be_e5245272540c style e2c6531e_c64a_1e84_8276_85229cee8b6f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
githubapi_test.go lines 351–365
func TestRaceContextCopy(t *testing.T) {
DefaultWriter = os.Stdout
router := Default()
router.GET("/test/copy/race", func(c *Context) {
c.Set("1", 0)
c.Set("2", 0)
// Sending a copy of the Context to two separate routines
go readWriteKeys(c.Copy())
go readWriteKeys(c.Copy())
c.String(http.StatusOK, "run OK, no panics")
})
w := PerformRequest(router, http.MethodGet, "/test/copy/race")
assert.Equal(t, "run OK, no panics", w.Body.String())
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does TestRaceContextCopy() do?
TestRaceContextCopy() is a function in the gin codebase, defined in githubapi_test.go.
Where is TestRaceContextCopy() defined?
TestRaceContextCopy() is defined in githubapi_test.go at line 351.
What does TestRaceContextCopy() call?
TestRaceContextCopy() calls 1 function(s): readWriteKeys.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free