Home / Function/ Test_Pprof_Index_WithPrefix() — fiber Function Reference

Test_Pprof_Index_WithPrefix() — fiber Function Reference

Architecture documentation for the Test_Pprof_Index_WithPrefix() function in pprof_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  adc7114c_675c_57d3_57d9_8b58b5275e1b["Test_Pprof_Index_WithPrefix()"]
  bab7fd6d_604c_3199_e6a9_4920ae309ff5["pprof_test.go"]
  adc7114c_675c_57d3_57d9_8b58b5275e1b -->|defined in| bab7fd6d_604c_3199_e6a9_4920ae309ff5
  style adc7114c_675c_57d3_57d9_8b58b5275e1b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/pprof/pprof_test.go lines 75–92

func Test_Pprof_Index_WithPrefix(t *testing.T) {
	app := fiber.New()

	app.Use(New(Config{Prefix: "/federated-fiber"}))

	app.Get("/", func(c fiber.Ctx) error {
		return c.SendString("escaped")
	})

	resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/federated-fiber/debug/pprof/", http.NoBody))
	require.NoError(t, err)
	require.Equal(t, 200, resp.StatusCode)
	require.Equal(t, fiber.MIMETextHTMLCharsetUTF8, resp.Header.Get(fiber.HeaderContentType))

	b, err := io.ReadAll(resp.Body)
	require.NoError(t, err)
	require.Contains(t, string(b), "<title>/debug/pprof/</title>")
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Pprof_Index_WithPrefix() do?
Test_Pprof_Index_WithPrefix() is a function in the fiber codebase, defined in middleware/pprof/pprof_test.go.
Where is Test_Pprof_Index_WithPrefix() defined?
Test_Pprof_Index_WithPrefix() is defined in middleware/pprof/pprof_test.go at line 75.

Analyze Your Own Codebase

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

Try Supermodel Free