TestRenderString() — gin Function Reference
Architecture documentation for the TestRenderString() function in render_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 3f1ccd28_98e8_2eec_1d0b_18f2fd3d866b["TestRenderString()"] 067a4839_481a_7bd8_fc59_5c8c3313879c["render_test.go"] 3f1ccd28_98e8_2eec_1d0b_18f2fd3d866b -->|defined in| 067a4839_481a_7bd8_fc59_5c8c3313879c style 3f1ccd28_98e8_2eec_1d0b_18f2fd3d866b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
render/render_test.go lines 458–475
func TestRenderString(t *testing.T) {
w := httptest.NewRecorder()
(String{
Format: "hello %s %d",
Data: []any{},
}).WriteContentType(w)
assert.Equal(t, "text/plain; charset=utf-8", w.Header().Get("Content-Type"))
err := (String{
Format: "hola %s %d",
Data: []any{"manu", 2},
}).Render(w)
require.NoError(t, err)
assert.Equal(t, "hola manu 2", w.Body.String())
assert.Equal(t, "text/plain; charset=utf-8", w.Header().Get("Content-Type"))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestRenderString() do?
TestRenderString() is a function in the gin codebase, defined in render/render_test.go.
Where is TestRenderString() defined?
TestRenderString() is defined in render/render_test.go at line 458.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free