Home / Function/ TestMappingCollectionFormatInvalid() — gin Function Reference

TestMappingCollectionFormatInvalid() — gin Function Reference

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

Entity Profile

Relationship Graph

Source Code

binding/form_mapping_test.go lines 366–382

func TestMappingCollectionFormatInvalid(t *testing.T) {
	var s struct {
		SliceCsv []int `form:"slice_csv" collection_format:"xxx"`
	}
	err := mappingByPtr(&s, formSource{
		"slice_csv": {"1,2"},
	}, "form")
	require.Error(t, err)

	var s2 struct {
		ArrayCsv [2]int `form:"array_csv" collection_format:"xxx"`
	}
	err = mappingByPtr(&s2, formSource{
		"array_csv": {"1,2"},
	}, "form")
	require.Error(t, err)
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free