Home / Function/ TestMappingStructField() — gin Function Reference

TestMappingStructField() — gin Function Reference

Architecture documentation for the TestMappingStructField() function in form_mapping_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

binding/form_mapping_test.go lines 432–442

func TestMappingStructField(t *testing.T) {
	var s struct {
		J struct {
			I int
		}
	}

	err := mappingByPtr(&s, formSource{"J": {`{"I": 9}`}}, "form")
	require.NoError(t, err)
	assert.Equal(t, 9, s.J.I)
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free