Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Dec 20, 2024
1 parent 043dd20 commit eed3d7f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions binder/cookie_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func Benchmark_CookieBinder_Bind(b *testing.B) {
var user User

req := fasthttp.AcquireRequest()
b.Cleanup(func() {
fasthttp.ReleaseRequest(req)
})

req.Header.SetCookie("name", "john")
req.Header.SetCookie("age", "42")
Expand Down
3 changes: 3 additions & 0 deletions binder/form_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func Benchmark_FormBinder_BindMultipart(b *testing.B) {
var user User

req := fasthttp.AcquireRequest()
b.Cleanup(func() {
fasthttp.ReleaseRequest(req)
})

buf := &bytes.Buffer{}
mw := multipart.NewWriter(buf)
Expand Down
4 changes: 4 additions & 0 deletions binder/header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func Benchmark_HeaderBinder_Bind(b *testing.B) {
var user User

req := fasthttp.AcquireRequest()
b.Cleanup(func() {
fasthttp.ReleaseRequest(req)
})

req.Header.Set("name", "john")
req.Header.Set("age", "42")
req.Header.Set("posts", "post1,post2,post3")
Expand Down
4 changes: 4 additions & 0 deletions binder/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func Benchmark_QueryBinder_Bind(b *testing.B) {
var user User

req := fasthttp.AcquireRequest()
b.Cleanup(func() {
fasthttp.ReleaseRequest(req)
})

req.URI().SetQueryString("name=john&age=42&posts=post1,post2,post3")

var err error
Expand Down

0 comments on commit eed3d7f

Please sign in to comment.