BenchmarkBind_All() — fiber Function Reference
Architecture documentation for the BenchmarkBind_All() function in bind_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD ba07f45f_45bb_a270_cccb_3c88736cddd0["BenchmarkBind_All()"] 55065b01_f5dc_4e53_5a74_5ecc7aca8f52["bind_test.go"] ba07f45f_45bb_a270_cccb_3c88736cddd0 -->|defined in| 55065b01_f5dc_4e53_5a74_5ecc7aca8f52 style ba07f45f_45bb_a270_cccb_3c88736cddd0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
bind_test.go lines 2362–2397
func BenchmarkBind_All(b *testing.B) {
type User struct {
SessionID string `json:"session_id" cookie:"session_id"`
Name string `query:"name" json:"name" form:"name"`
Email string `json:"email" form:"email"`
Role string `header:"X-User-Role"`
ID int `uri:"id" query:"id" json:"id" form:"id"`
}
app := New()
c := app.AcquireCtx(&fasthttp.RequestCtx{})
config := &RequestConfig{
ContentType: MIMEApplicationJSON,
Body: []byte(`{"name":"john", "email": "john@doe.com", "session_id": "abc1234", "id": 1}`),
Headers: map[string]string{
"X-User-Role": "admin",
},
Cookies: map[string]string{
"session_id": "abc123",
},
Query: "id=1&name=john",
}
bind := &Bind{
ctx: c,
}
for b.Loop() {
user := &User{}
config.ApplyTo(c)
if err := bind.All(user); err != nil {
b.Fatalf("unexpected error: %v", err)
}
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does BenchmarkBind_All() do?
BenchmarkBind_All() is a function in the fiber codebase, defined in bind_test.go.
Where is BenchmarkBind_All() defined?
BenchmarkBind_All() is defined in bind_test.go at line 2362.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free