Home / Function/ Test_Ctx_End_with_drop_middleware() — fiber Function Reference

Test_Ctx_End_with_drop_middleware() — fiber Function Reference

Architecture documentation for the Test_Ctx_End_with_drop_middleware() function in ctx_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  9d4a4a5a_8cbf_394d_35e1_e603cb665334["Test_Ctx_End_with_drop_middleware()"]
  7b3d4933_5ae3_f84d_ff6d_0cb34e268026["ctx_test.go"]
  9d4a4a5a_8cbf_394d_35e1_e603cb665334 -->|defined in| 7b3d4933_5ae3_f84d_ff6d_0cb34e268026
  style 9d4a4a5a_8cbf_394d_35e1_e603cb665334 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

ctx_test.go lines 8051–8071

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

	// Middleware that will drop connections
	// that persist after c.Next()
	app.Use(func(c Ctx) error {
		c.Next() //nolint:errcheck // unnecessary to check error
		return c.Drop()
	})

	// Early flushing handler
	app.Get("/", func(c Ctx) error {
		c.SendStatus(StatusOK) //nolint:errcheck // unnecessary to check error
		return c.End()
	})

	resp, err := app.Test(httptest.NewRequest(MethodGet, "/", http.NoBody))
	require.NoError(t, err)
	require.NotNil(t, resp)
	require.Equal(t, StatusOK, resp.StatusCode)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_Ctx_End_with_drop_middleware() do?
Test_Ctx_End_with_drop_middleware() is a function in the fiber codebase, defined in ctx_test.go.
Where is Test_Ctx_End_with_drop_middleware() defined?
Test_Ctx_End_with_drop_middleware() is defined in ctx_test.go at line 8051.

Analyze Your Own Codebase

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

Try Supermodel Free