Benchmark_Redirect_OldInput() — fiber Function Reference
Architecture documentation for the Benchmark_Redirect_OldInput() function in redirect_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 2709ec12_8f81_8569_3d78_859a02fb8d43["Benchmark_Redirect_OldInput()"] fee77792_8d65_0d02_107f_9a956c66b44c["redirect_test.go"] 2709ec12_8f81_8569_3d78_859a02fb8d43 -->|defined in| fee77792_8d65_0d02_107f_9a956c66b44c style 2709ec12_8f81_8569_3d78_859a02fb8d43 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
redirect_test.go lines 997–1023
func Benchmark_Redirect_OldInput(b *testing.B) {
app := New()
app.Get("/user", func(c Ctx) error {
return c.SendString("user")
}).Name("user")
c := app.AcquireCtx(&fasthttp.RequestCtx{}).(*DefaultCtx) //nolint:errcheck,forcetypeassert // not needed
val, err := testredirectionMsgs.MarshalMsg(nil)
require.NoError(b, err)
c.Request().Header.Set(HeaderCookie, "fiber_flash="+hex.EncodeToString(val))
c.Redirect().parseAndClearFlashMessages()
var input OldInputData
b.ReportAllocs()
for b.Loop() {
input = c.Redirect().OldInput("name")
}
require.Equal(b, OldInputData{
Key: "name",
Value: "tom",
}, input)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Benchmark_Redirect_OldInput() do?
Benchmark_Redirect_OldInput() is a function in the fiber codebase, defined in redirect_test.go.
Where is Benchmark_Redirect_OldInput() defined?
Benchmark_Redirect_OldInput() is defined in redirect_test.go at line 997.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free