Home / Function/ TestMappingIgnoreField() — gin Function Reference

TestMappingIgnoreField() — gin Function Reference

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

Entity Profile

Relationship Graph

Source Code

binding/form_mapping_test.go lines 97–107

func TestMappingIgnoreField(t *testing.T) {
	var s struct {
		A int `form:"A"`
		B int `form:"-"`
	}
	err := mappingByPtr(&s, formSource{"A": {"9"}, "B": {"9"}}, "form")
	require.NoError(t, err)

	assert.Equal(t, 9, s.A)
	assert.Equal(t, 0, s.B)
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free