Home / Function/ TestValidationDisabled() — gin Function Reference

TestValidationDisabled() — gin Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  c3c8f0ba_aefc_9d6e_ba2f_1976294ce5db["TestValidationDisabled()"]
  2899e942_a23d_574e_8d47_d28e895c2604["requestWithBody()"]
  c3c8f0ba_aefc_9d6e_ba2f_1976294ce5db -->|calls| 2899e942_a23d_574e_8d47_d28e895c2604
  style c3c8f0ba_aefc_9d6e_ba2f_1976294ce5db fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/binding_test.go lines 757–766

func TestValidationDisabled(t *testing.T) {
	backup := Validator
	Validator = nil
	defer func() { Validator = backup }()

	var obj FooStruct
	req := requestWithBody(http.MethodPost, "/", `{"bar": "foo"}`)
	err := JSON.Bind(req, &obj)
	require.NoError(t, err)
}

Domain

Subdomains

Frequently Asked Questions

What does TestValidationDisabled() do?
TestValidationDisabled() is a function in the gin codebase.
What does TestValidationDisabled() call?
TestValidationDisabled() calls 1 function(s): requestWithBody.

Analyze Your Own Codebase

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

Try Supermodel Free