Home / Function/ testBodyBindingSlice() — gin Function Reference

testBodyBindingSlice() — gin Function Reference

Architecture documentation for the testBodyBindingSlice() function in binding_test.go from the gin codebase.

Function go RequestBinding FormBinding calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  46632c2f_0364_937c_dd28_7467f1128e6e["testBodyBindingSlice()"]
  314c6481_2bd0_e5a7_282c_94e41df6062a["binding_test.go"]
  46632c2f_0364_937c_dd28_7467f1128e6e -->|defined in| 314c6481_2bd0_e5a7_282c_94e41df6062a
  c4adba41_21a3_6f62_f233_424513f3dcc7["TestBindingJSONSlice()"]
  c4adba41_21a3_6f62_f233_424513f3dcc7 -->|calls| 46632c2f_0364_937c_dd28_7467f1128e6e
  aebd0564_565b_ba1b_7f92_4baaca0e7b7e["requestWithBody()"]
  46632c2f_0364_937c_dd28_7467f1128e6e -->|calls| aebd0564_565b_ba1b_7f92_4baaca0e7b7e
  style 46632c2f_0364_937c_dd28_7467f1128e6e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/binding_test.go lines 1232–1244

func testBodyBindingSlice(t *testing.T, b Binding, name, path, badPath, body, badBody string) {
	assert.Equal(t, name, b.Name())

	var obj1 []FooStruct
	req := requestWithBody(http.MethodPost, path, body)
	err := b.Bind(req, &obj1)
	require.NoError(t, err)

	var obj2 []FooStruct
	req = requestWithBody(http.MethodPost, badPath, badBody)
	err = JSON.Bind(req, &obj2)
	require.Error(t, err)
}

Subdomains

Frequently Asked Questions

What does testBodyBindingSlice() do?
testBodyBindingSlice() is a function in the gin codebase, defined in binding/binding_test.go.
Where is testBodyBindingSlice() defined?
testBodyBindingSlice() is defined in binding/binding_test.go at line 1232.
What does testBodyBindingSlice() call?
testBodyBindingSlice() calls 1 function(s): requestWithBody.
What calls testBodyBindingSlice()?
testBodyBindingSlice() is called by 1 function(s): TestBindingJSONSlice.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free