TestBindUri() — gin Function Reference
Architecture documentation for the TestBindUri() function in githubapi_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 5f537ee5_114b_3037_7a87_16368102da0f["TestBindUri()"] 851931d7_59a3_9c02_f8d4_6771ae5af6e6["githubapi_test.go"] 5f537ee5_114b_3037_7a87_16368102da0f -->|defined in| 851931d7_59a3_9c02_f8d4_6771ae5af6e6 3a892a12_f532_bb8c_bb71_193635cb2f99["exampleFromPath()"] 5f537ee5_114b_3037_7a87_16368102da0f -->|calls| 3a892a12_f532_bb8c_bb71_193635cb2f99 style 5f537ee5_114b_3037_7a87_16368102da0f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
githubapi_test.go lines 312–332
func TestBindUri(t *testing.T) {
DefaultWriter = os.Stdout
router := New()
type Person struct {
Name string `uri:"name" binding:"required"`
ID string `uri:"id" binding:"required"`
}
router.Handle(http.MethodGet, "/rest/:name/:id", func(c *Context) {
var person Person
require.NoError(t, c.BindUri(&person))
assert.NotEmpty(t, person.Name)
assert.NotEmpty(t, person.ID)
c.String(http.StatusOK, "BindUri test OK")
})
path, _ := exampleFromPath("/rest/:name/:id")
w := PerformRequest(router, http.MethodGet, path)
assert.Equal(t, "BindUri test OK", w.Body.String())
assert.Equal(t, http.StatusOK, w.Code)
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does TestBindUri() do?
TestBindUri() is a function in the gin codebase, defined in githubapi_test.go.
Where is TestBindUri() defined?
TestBindUri() is defined in githubapi_test.go at line 312.
What does TestBindUri() call?
TestBindUri() calls 1 function(s): exampleFromPath.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free