Home / Function/ TestContextGetStringMap() — gin Function Reference

TestContextGetStringMap() — gin Function Reference

Architecture documentation for the TestContextGetStringMap() function in context_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

context_test.go lines 638–646

func TestContextGetStringMap(t *testing.T) {
	c, _ := CreateTestContext(httptest.NewRecorder())
	m := make(map[string]any)
	m["foo"] = 1
	c.Set("map", m)

	assert.Equal(t, m, c.GetStringMap("map"))
	assert.Equal(t, 1, c.GetStringMap("map")["foo"])
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free