Test_Route_Match_Parser() — fiber Function Reference
Architecture documentation for the Test_Route_Match_Parser() function in router_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 6cded857_0474_a07d_b435_cb3b893d5b4d["Test_Route_Match_Parser()"] 326d7e00_9e4f_d854_0c78_b9c0c93e5537["router_test.go"] 6cded857_0474_a07d_b435_cb3b893d5b4d -->|defined in| 326d7e00_9e4f_d854_0c78_b9c0c93e5537 style 6cded857_0474_a07d_b435_cb3b893d5b4d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
router_test.go lines 316–343
func Test_Route_Match_Parser(t *testing.T) {
t.Parallel()
app := New()
app.Get("/foo/:ParamName", func(c Ctx) error {
return c.SendString(c.Params("ParamName"))
})
app.Get("/Foobar/*", func(c Ctx) error {
return c.SendString(c.Params("*"))
})
resp, err := app.Test(httptest.NewRequest(MethodGet, "/foo/bar", http.NoBody))
require.NoError(t, err, "app.Test(req)")
require.Equal(t, 200, resp.StatusCode, "Status code")
body, err := io.ReadAll(resp.Body)
require.NoError(t, err, "app.Test(req)")
require.Equal(t, "bar", app.toString(body))
// with star
resp, err = app.Test(httptest.NewRequest(MethodGet, "/Foobar/test", http.NoBody))
require.NoError(t, err, "app.Test(req)")
require.Equal(t, 200, resp.StatusCode, "Status code")
body, err = io.ReadAll(resp.Body)
require.NoError(t, err, "app.Test(req)")
require.Equal(t, "test", app.toString(body))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Route_Match_Parser() do?
Test_Route_Match_Parser() is a function in the fiber codebase, defined in router_test.go.
Where is Test_Route_Match_Parser() defined?
Test_Route_Match_Parser() is defined in router_test.go at line 316.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free