Home / Function/ TestContextAddParam() — gin Function Reference

TestContextAddParam() — gin Function Reference

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

Entity Profile

Relationship Graph

Source Code

context_test.go lines 3306–3315

func TestContextAddParam(t *testing.T) {
	c := &Context{}
	id := "id"
	value := "1"
	c.AddParam(id, value)

	v, ok := c.Params.Get(id)
	assert.True(t, ok)
	assert.Equal(t, value, v)
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free