TestRenderXML() — gin Function Reference
Architecture documentation for the TestRenderXML() function in render_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD dae72033_5fea_c119_fa79_c3c0b59848cb["TestRenderXML()"] 067a4839_481a_7bd8_fc59_5c8c3313879c["render_test.go"] dae72033_5fea_c119_fa79_c3c0b59848cb -->|defined in| 067a4839_481a_7bd8_fc59_5c8c3313879c style dae72033_5fea_c119_fa79_c3c0b59848cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
render/render_test.go lines 388–402
func TestRenderXML(t *testing.T) {
w := httptest.NewRecorder()
data := xmlmap{
"foo": "bar",
}
(XML{data}).WriteContentType(w)
assert.Equal(t, "application/xml; charset=utf-8", w.Header().Get("Content-Type"))
err := (XML{data}).Render(w)
require.NoError(t, err)
assert.Equal(t, "<map><foo>bar</foo></map>", w.Body.String())
assert.Equal(t, "application/xml; charset=utf-8", w.Header().Get("Content-Type"))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestRenderXML() do?
TestRenderXML() is a function in the gin codebase, defined in render/render_test.go.
Where is TestRenderXML() defined?
TestRenderXML() is defined in render/render_test.go at line 388.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free