Home / Function/ TestUriInnerBinding() — gin Function Reference

TestUriInnerBinding() — gin Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b0cca270_b98e_f42d_2501_0fe0afa67970["TestUriInnerBinding()"]
  314c6481_2bd0_e5a7_282c_94e41df6062a["binding_test.go"]
  b0cca270_b98e_f42d_2501_0fe0afa67970 -->|defined in| 314c6481_2bd0_e5a7_282c_94e41df6062a
  style b0cca270_b98e_f42d_2501_0fe0afa67970 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/binding_test.go lines 836–856

func TestUriInnerBinding(t *testing.T) {
	type Tag struct {
		Name string `uri:"name"`
		S    struct {
			Age int `uri:"age"`
		}
	}

	expectedName := "mike"
	expectedAge := 25

	m := map[string][]string{
		"name": {expectedName},
		"age":  {strconv.Itoa(expectedAge)},
	}

	var tag Tag
	require.NoError(t, Uri.BindUri(m, &tag))
	assert.Equal(t, expectedName, tag.Name)
	assert.Equal(t, expectedAge, tag.S.Age)
}

Subdomains

Frequently Asked Questions

What does TestUriInnerBinding() do?
TestUriInnerBinding() is a function in the gin codebase, defined in binding/binding_test.go.
Where is TestUriInnerBinding() defined?
TestUriInnerBinding() is defined in binding/binding_test.go at line 836.

Analyze Your Own Codebase

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

Try Supermodel Free