Home / Function/ TestXMLBindingBindBody() — gin Function Reference

TestXMLBindingBindBody() — gin Function Reference

Architecture documentation for the TestXMLBindingBindBody() function in xml_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  372cb594_6e06_f5dd_9c40_a0d3c4cbac79["TestXMLBindingBindBody()"]
  9b14f5fa_5262_44b1_edb8_65be9c4d447d["xml_test.go"]
  372cb594_6e06_f5dd_9c40_a0d3c4cbac79 -->|defined in| 9b14f5fa_5262_44b1_edb8_65be9c4d447d
  style 372cb594_6e06_f5dd_9c40_a0d3c4cbac79 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/xml_test.go lines 14–25

func TestXMLBindingBindBody(t *testing.T) {
	var s struct {
		Foo string `xml:"foo"`
	}
	xmlBody := `<?xml version="1.0" encoding="UTF-8"?>
<root>
   <foo>FOO</foo>
</root>`
	err := xmlBinding{}.BindBody([]byte(xmlBody), &s)
	require.NoError(t, err)
	assert.Equal(t, "FOO", s.Foo)
}

Subdomains

Defined In

Frequently Asked Questions

What does TestXMLBindingBindBody() do?
TestXMLBindingBindBody() is a function in the gin codebase, defined in binding/xml_test.go.
Where is TestXMLBindingBindBody() defined?
TestXMLBindingBindBody() is defined in binding/xml_test.go at line 14.

Analyze Your Own Codebase

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

Try Supermodel Free