TestRenderIndentedJSON() — gin Function Reference
Architecture documentation for the TestRenderIndentedJSON() function in render_test.go from the gin codebase.
Entity Profile
Relationship Graph
Source Code
render/render_test.go lines 54–66
func TestRenderIndentedJSON(t *testing.T) {
w := httptest.NewRecorder()
data := map[string]any{
"foo": "bar",
"bar": "foo",
}
err := (IndentedJSON{data}).Render(w)
require.NoError(t, err)
assert.JSONEq(t, "{\n \"bar\": \"foo\",\n \"foo\": \"bar\"\n}", w.Body.String())
assert.Equal(t, "application/json; charset=utf-8", w.Header().Get("Content-Type"))
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free