Benchmark_CBORBinder_Bind() — fiber Function Reference
Architecture documentation for the Benchmark_CBORBinder_Bind() function in cbor_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 3aadfa2c_4ec9_997f_bac5_ccd0832a05f4["Benchmark_CBORBinder_Bind()"] c3eb4349_8638_9743_621e_0c894e704e9b["cbor_test.go"] 3aadfa2c_4ec9_997f_bac5_ccd0832a05f4 -->|defined in| c3eb4349_8638_9743_621e_0c894e704e9b style 3aadfa2c_4ec9_997f_bac5_ccd0832a05f4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
binder/cbor_test.go lines 63–91
func Benchmark_CBORBinder_Bind(b *testing.B) {
b.ReportAllocs()
binder := &CBORBinding{
CBORDecoder: cbor.Unmarshal,
}
type User struct {
Name string `cbor:"name"`
Age int `cbor:"age"`
}
var user User
wantedUser := User{
Name: "john",
Age: 42,
}
body, err := cbor.Marshal(wantedUser)
require.NoError(b, err)
for b.Loop() {
err = binder.Bind(body, &user)
}
require.NoError(b, err)
require.Equal(b, "john", user.Name)
require.Equal(b, 42, user.Age)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Benchmark_CBORBinder_Bind() do?
Benchmark_CBORBinder_Bind() is a function in the fiber codebase, defined in binder/cbor_test.go.
Where is Benchmark_CBORBinder_Bind() defined?
Benchmark_CBORBinder_Bind() is defined in binder/cbor_test.go at line 63.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free