TestContextRenderDataFromReaderNoHeaders() — gin Function Reference
Architecture documentation for the TestContextRenderDataFromReaderNoHeaders() function in context_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD afad916d_6190_018b_8c3e_3e32a5c39d7e["TestContextRenderDataFromReaderNoHeaders()"] ebe0ae48_a62b_a38f_5bac_5bbbd96fc508["context_test.go"] afad916d_6190_018b_8c3e_3e32a5c39d7e -->|defined in| ebe0ae48_a62b_a38f_5bac_5bbbd96fc508 style afad916d_6190_018b_8c3e_3e32a5c39d7e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
context_test.go lines 2969–2984
func TestContextRenderDataFromReaderNoHeaders(t *testing.T) {
w := httptest.NewRecorder()
c, _ := CreateTestContext(w)
body := "#!PNG some raw data"
reader := strings.NewReader(body)
contentLength := int64(len(body))
contentType := "image/png"
c.DataFromReader(http.StatusOK, contentLength, contentType, reader, nil)
assert.Equal(t, http.StatusOK, w.Code)
assert.Equal(t, body, w.Body.String())
assert.Equal(t, contentType, w.Header().Get("Content-Type"))
assert.Equal(t, strconv.FormatInt(contentLength, 10), w.Header().Get("Content-Length"))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestContextRenderDataFromReaderNoHeaders() do?
TestContextRenderDataFromReaderNoHeaders() is a function in the gin codebase, defined in context_test.go.
Where is TestContextRenderDataFromReaderNoHeaders() defined?
TestContextRenderDataFromReaderNoHeaders() is defined in context_test.go at line 2969.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free