Home / Function/ TestMappingCustomPointerStructTypeUnmarshalTextUri() — gin Function Reference

TestMappingCustomPointerStructTypeUnmarshalTextUri() — gin Function Reference

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

Entity Profile

Relationship Graph

Source Code

binding/form_mapping_test.go lines 838–848

func TestMappingCustomPointerStructTypeUnmarshalTextUri(t *testing.T) {
	var s struct {
		FileData *customUnmarshalTextType `uri:"data,parser=encoding.TextUnmarshaler"`
	}
	err := mappingByPtr(&s, formSource{"data": {`file:/foo:happiness`}}, "uri")
	require.NoError(t, err)

	assert.Equal(t, "file", s.FileData.Protocol)
	assert.Equal(t, "/foo", s.FileData.Path)
	assert.Equal(t, "happiness", s.FileData.Name)
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free