TestContextWithFallbackErrFromRequestContext() — gin Function Reference
Architecture documentation for the TestContextWithFallbackErrFromRequestContext() function in context_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 9906604d_ee5f_6cc3_7322_fdf4ad24f7c7["TestContextWithFallbackErrFromRequestContext()"] ebe0ae48_a62b_a38f_5bac_5bbbd96fc508["context_test.go"] 9906604d_ee5f_6cc3_7322_fdf4ad24f7c7 -->|defined in| ebe0ae48_a62b_a38f_5bac_5bbbd96fc508 style 9906604d_ee5f_6cc3_7322_fdf4ad24f7c7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
context_test.go lines 3158–3175
func TestContextWithFallbackErrFromRequestContext(t *testing.T) {
c, _ := CreateTestContext(httptest.NewRecorder())
// enable ContextWithFallback feature flag
c.engine.ContextWithFallback = true
require.NoError(t, c.Err())
c2, _ := CreateTestContext(httptest.NewRecorder())
// enable ContextWithFallback feature flag
c2.engine.ContextWithFallback = true
c2.Request, _ = http.NewRequest(http.MethodGet, "/", nil)
ctx, cancel := context.WithCancel(context.Background())
c2.Request = c2.Request.WithContext(ctx)
cancel()
assert.EqualError(t, c2.Err(), context.Canceled.Error())
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestContextWithFallbackErrFromRequestContext() do?
TestContextWithFallbackErrFromRequestContext() is a function in the gin codebase, defined in context_test.go.
Where is TestContextWithFallbackErrFromRequestContext() defined?
TestContextWithFallbackErrFromRequestContext() is defined in context_test.go at line 3158.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free