createMultipartRequest() — gin Function Reference
Architecture documentation for the createMultipartRequest() function in context_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 46eeb8d5_2bd3_4a14_0cbf_ca0f7575dd7b["createMultipartRequest()"] 6fec33a9_81c0_406d_eac9_4a3e3b474202["TestContextPostFormMultipart()"] 6fec33a9_81c0_406d_eac9_4a3e3b474202 -->|calls| 46eeb8d5_2bd3_4a14_0cbf_ca0f7575dd7b a007da10_d85d_14be_cdc7_4b615661025a["must()"] 46eeb8d5_2bd3_4a14_0cbf_ca0f7575dd7b -->|calls| a007da10_d85d_14be_cdc7_4b615661025a style 46eeb8d5_2bd3_4a14_0cbf_ca0f7575dd7b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
context_test.go lines 49–71
func createMultipartRequest() *http.Request {
boundary := "--testboundary"
body := new(bytes.Buffer)
mw := multipart.NewWriter(body)
defer mw.Close()
must(mw.SetBoundary(boundary))
must(mw.WriteField("foo", "bar"))
must(mw.WriteField("bar", "10"))
must(mw.WriteField("bar", "foo2"))
must(mw.WriteField("array", "first"))
must(mw.WriteField("array", "second"))
must(mw.WriteField("id", ""))
must(mw.WriteField("time_local", "31/12/2016 14:55"))
must(mw.WriteField("time_utc", "31/12/2016 14:55"))
must(mw.WriteField("time_location", "31/12/2016 14:55"))
must(mw.WriteField("names[a]", "thinkerou"))
must(mw.WriteField("names[b]", "tianou"))
req, err := http.NewRequest(http.MethodPost, "/", body)
must(err)
req.Header.Set("Content-Type", MIMEMultipartPOSTForm+"; boundary="+boundary)
return req
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does createMultipartRequest() do?
createMultipartRequest() is a function in the gin codebase.
What does createMultipartRequest() call?
createMultipartRequest() calls 1 function(s): must.
What calls createMultipartRequest()?
createMultipartRequest() is called by 1 function(s): TestContextPostFormMultipart.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free