Benchmark_Ctx_Attachment() — fiber Function Reference
Architecture documentation for the Benchmark_Ctx_Attachment() function in ctx_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 245b9821_fb7a_0b45_8697_53f5f306508c["Benchmark_Ctx_Attachment()"] 7b3d4933_5ae3_f84d_ff6d_0cb34e268026["ctx_test.go"] 245b9821_fb7a_0b45_8697_53f5f306508c -->|defined in| 7b3d4933_5ae3_f84d_ff6d_0cb34e268026 style 245b9821_fb7a_0b45_8697_53f5f306508c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
ctx_test.go lines 770–780
func Benchmark_Ctx_Attachment(b *testing.B) {
app := New()
c := app.AcquireCtx(&fasthttp.RequestCtx{}).(*DefaultCtx) //nolint:errcheck,forcetypeassert // not needed
b.ReportAllocs()
for b.Loop() {
// example with quote params
c.Attachment("another document.pdf\"\r\nBla: \"fasel")
}
require.Equal(b, `attachment; filename="another+document.pdf%22Bla%3A+%22fasel"`, string(c.Response().Header.Peek(HeaderContentDisposition)))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Benchmark_Ctx_Attachment() do?
Benchmark_Ctx_Attachment() is a function in the fiber codebase, defined in ctx_test.go.
Where is Benchmark_Ctx_Attachment() defined?
Benchmark_Ctx_Attachment() is defined in ctx_test.go at line 770.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free