Home / Function/ Test_Ctx_SetContext() — fiber Function Reference

Test_Ctx_SetContext() — fiber Function Reference

Architecture documentation for the Test_Ctx_SetContext() function in ctx_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  447ee661_457d_d834_cd34_976a29b29e02["Test_Ctx_SetContext()"]
  7b3d4933_5ae3_f84d_ff6d_0cb34e268026["ctx_test.go"]
  447ee661_457d_d834_cd34_976a29b29e02 -->|defined in| 7b3d4933_5ae3_f84d_ff6d_0cb34e268026
  01abf773_217c_9cb0_9cd2_6539f5b80a92["Context()"]
  447ee661_457d_d834_cd34_976a29b29e02 -->|calls| 01abf773_217c_9cb0_9cd2_6539f5b80a92
  style 447ee661_457d_d834_cd34_976a29b29e02 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

ctx_test.go lines 3451–3461

func Test_Ctx_SetContext(t *testing.T) {
	t.Parallel()
	app := New()
	c := app.AcquireCtx(&fasthttp.RequestCtx{})

	var testKey testContextKey
	testValue := "Test Value"
	ctx := context.WithValue(context.Background(), testKey, testValue)
	c.SetContext(ctx)
	require.Equal(t, testValue, c.Context().Value(testKey))
}

Domain

Subdomains

Defined In

Calls

Frequently Asked Questions

What does Test_Ctx_SetContext() do?
Test_Ctx_SetContext() is a function in the fiber codebase, defined in ctx_test.go.
Where is Test_Ctx_SetContext() defined?
Test_Ctx_SetContext() is defined in ctx_test.go at line 3451.
What does Test_Ctx_SetContext() call?
Test_Ctx_SetContext() calls 1 function(s): Context.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free