testBodyBindingUseNumber2() — gin Function Reference
Architecture documentation for the testBodyBindingUseNumber2() function in binding_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD e81484db_dd3a_bc37_e89a_06e5ecc12c93["testBodyBindingUseNumber2()"] 314c6481_2bd0_e5a7_282c_94e41df6062a["binding_test.go"] e81484db_dd3a_bc37_e89a_06e5ecc12c93 -->|defined in| 314c6481_2bd0_e5a7_282c_94e41df6062a 7fce152c_047f_165e_ad58_556e8e0aef80["TestBindingJSONUseNumber2()"] 7fce152c_047f_165e_ad58_556e8e0aef80 -->|calls| e81484db_dd3a_bc37_e89a_06e5ecc12c93 aebd0564_565b_ba1b_7f92_4baaca0e7b7e["requestWithBody()"] e81484db_dd3a_bc37_e89a_06e5ecc12c93 -->|calls| aebd0564_565b_ba1b_7f92_4baaca0e7b7e style e81484db_dd3a_bc37_e89a_06e5ecc12c93 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
binding/binding_test.go lines 1291–1307
func testBodyBindingUseNumber2(t *testing.T, b Binding, name, path, badPath, body, badBody string) {
assert.Equal(t, name, b.Name())
obj := FooStructUseNumber{}
req := requestWithBody(http.MethodPost, path, body)
EnableDecoderUseNumber = false
err := b.Bind(req, &obj)
require.NoError(t, err)
// it will return float64(123) if not use EnableDecoderUseNumber
// maybe it is not hoped
assert.InDelta(t, float64(123), obj.Foo, 0.01)
obj = FooStructUseNumber{}
req = requestWithBody(http.MethodPost, badPath, badBody)
err = JSON.Bind(req, &obj)
require.Error(t, err)
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does testBodyBindingUseNumber2() do?
testBodyBindingUseNumber2() is a function in the gin codebase, defined in binding/binding_test.go.
Where is testBodyBindingUseNumber2() defined?
testBodyBindingUseNumber2() is defined in binding/binding_test.go at line 1291.
What does testBodyBindingUseNumber2() call?
testBodyBindingUseNumber2() calls 1 function(s): requestWithBody.
What calls testBodyBindingUseNumber2()?
testBodyBindingUseNumber2() is called by 1 function(s): TestBindingJSONUseNumber2.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free