TestUriBinding() — gin Function Reference
Architecture documentation for the TestUriBinding() function in binding_test.go from the gin codebase.
Entity Profile
Relationship Graph
Source Code
binding/binding_test.go lines 815–834
func TestUriBinding(t *testing.T) {
b := Uri
assert.Equal(t, "uri", b.Name())
type Tag struct {
Name string `uri:"name"`
}
var tag Tag
m := make(map[string][]string)
m["name"] = []string{"thinkerou"}
require.NoError(t, b.BindUri(m, &tag))
assert.Equal(t, "thinkerou", tag.Name)
type NotSupportStruct struct {
Name map[string]any `uri:"name"`
}
var not NotSupportStruct
require.Error(t, b.BindUri(m, ¬))
assert.Equal(t, map[string]any(nil), not.Name)
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free