TestToFiberHandler_FasthttpHandlerWithError() — fiber Function Reference
Architecture documentation for the TestToFiberHandler_FasthttpHandlerWithError() function in adapter_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD a2c3e470_503a_d7f9_7010_58682abfa181["TestToFiberHandler_FasthttpHandlerWithError()"] 3ad7a4ef_7f07_008c_234d_52c9a342aa98["adapter_test.go"] a2c3e470_503a_d7f9_7010_58682abfa181 -->|defined in| 3ad7a4ef_7f07_008c_234d_52c9a342aa98 3776f9ef_b978_a0be_2199_412bb0eee3ec["newTestCtx()"] a2c3e470_503a_d7f9_7010_58682abfa181 -->|calls| 3776f9ef_b978_a0be_2199_412bb0eee3ec style a2c3e470_503a_d7f9_7010_58682abfa181 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
adapter_test.go lines 647–664
func TestToFiberHandler_FasthttpHandlerWithError(t *testing.T) {
t.Parallel()
_, ctx := newTestCtx(t)
fasthttpHandler := func(fctx *fasthttp.RequestCtx) error {
fctx.Response.Header.Set("X-FASTHTTP", "error")
return errors.New("fasthttp error")
}
converted, ok := toFiberHandler(fasthttpHandler)
require.True(t, ok)
require.NotNil(t, converted)
err := converted(ctx)
require.EqualError(t, err, "fasthttp error")
require.Equal(t, "error", string(ctx.Response().Header.Peek("X-FASTHTTP")))
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does TestToFiberHandler_FasthttpHandlerWithError() do?
TestToFiberHandler_FasthttpHandlerWithError() is a function in the fiber codebase, defined in adapter_test.go.
Where is TestToFiberHandler_FasthttpHandlerWithError() defined?
TestToFiberHandler_FasthttpHandlerWithError() is defined in adapter_test.go at line 647.
What does TestToFiberHandler_FasthttpHandlerWithError() call?
TestToFiberHandler_FasthttpHandlerWithError() calls 1 function(s): newTestCtx.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free