Home / Function/ TestMappingCustomSliceOfSliceUnmarshalTextForm() — gin Function Reference

TestMappingCustomSliceOfSliceUnmarshalTextForm() — gin Function Reference

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

Entity Profile

Relationship Graph

Source Code

binding/form_mapping_test.go lines 905–912

func TestMappingCustomSliceOfSliceUnmarshalTextForm(t *testing.T) {
	var s struct {
		FileData []customPathUnmarshalText `form:"path,parser=encoding.TextUnmarshaler" collection_format:"csv"`
	}
	err := mappingByPtr(&s, formSource{"path": {"bar/foo,bar/foo/spam"}}, "form")
	require.NoError(t, err)
	assert.Equal(t, []customPathUnmarshalText{{"bar", "foo"}, {"bar", "foo", "spam"}}, s.FileData)
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free