createRedirectServer() — fiber Function Reference
Architecture documentation for the createRedirectServer() function in proxy_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 188b57dc_09d5_e4f7_7fbc_66e91710cb07["createRedirectServer()"] a7c70172_e40a_6ad6_65b6_b8f508cfb0a2["proxy_test.go"] 188b57dc_09d5_e4f7_7fbc_66e91710cb07 -->|defined in| a7c70172_e40a_6ad6_65b6_b8f508cfb0a2 194db646_00eb_ad03_722b_15072bd04532["Test_Proxy_Do_WithRedirect()"] 194db646_00eb_ad03_722b_15072bd04532 -->|calls| 188b57dc_09d5_e4f7_7fbc_66e91710cb07 1ce90b89_4794_9d4d_fc3c_5b9c537b3483["Test_Proxy_DoRedirects_RestoreOriginalURL()"] 1ce90b89_4794_9d4d_fc3c_5b9c537b3483 -->|calls| 188b57dc_09d5_e4f7_7fbc_66e91710cb07 202597e7_924f_1a70_e84a_84b6d5a52f6c["Test_Proxy_DoRedirects_TooManyRedirects()"] 202597e7_924f_1a70_e84a_84b6d5a52f6c -->|calls| 188b57dc_09d5_e4f7_7fbc_66e91710cb07 fc2b6784_0dfb_d6e2_4148_406d442e8019["startServer()"] 188b57dc_09d5_e4f7_7fbc_66e91710cb07 -->|calls| fc2b6784_0dfb_d6e2_4148_406d442e8019 style 188b57dc_09d5_e4f7_7fbc_66e91710cb07 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/proxy/proxy_test.go lines 59–82
func createRedirectServer(t *testing.T) string {
t.Helper()
app := fiber.New()
var addr string
app.Get("/", func(c fiber.Ctx) error {
c.Location("http://" + addr + "/final")
return c.Status(fiber.StatusMovedPermanently).SendString("redirect")
})
app.Get("/final", func(c fiber.Ctx) error {
return c.SendString("final")
})
ln, err := net.Listen(fiber.NetworkTCP4, "127.0.0.1:0")
require.NoError(t, err)
t.Cleanup(func() {
ln.Close() //nolint:errcheck // It is fine to ignore the error here
})
addr = ln.Addr().String()
startServer(app, ln)
return addr
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does createRedirectServer() do?
createRedirectServer() is a function in the fiber codebase, defined in middleware/proxy/proxy_test.go.
Where is createRedirectServer() defined?
createRedirectServer() is defined in middleware/proxy/proxy_test.go at line 59.
What does createRedirectServer() call?
createRedirectServer() calls 1 function(s): startServer.
What calls createRedirectServer()?
createRedirectServer() is called by 3 function(s): Test_Proxy_DoRedirects_RestoreOriginalURL, Test_Proxy_DoRedirects_TooManyRedirects, Test_Proxy_Do_WithRedirect.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free