Home / File/ bind_test.go — fiber Source File

bind_test.go — fiber Source File

Architecture documentation for bind_test.go, a go file in the fiber codebase. 1 imports, 0 dependents.

File go FiberCore Context 1 imports 54 functions 4 classes

Entity Profile

Dependency Diagram

graph LR
  55065b01_f5dc_4e53_5a74_5ecc7aca8f52["bind_test.go"]
  c0b86961_3ef1_0168_52fc_98627566ed27["bytes"]
  55065b01_f5dc_4e53_5a74_5ecc7aca8f52 --> c0b86961_3ef1_0168_52fc_98627566ed27
  style 55065b01_f5dc_4e53_5a74_5ecc7aca8f52 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

//nolint:wrapcheck,tagliatelle // We must not wrap errors in tests
package fiber

import (
	"bytes"
	"compress/gzip"
	"encoding/json"
	"errors"
	"fmt"
	"mime/multipart"
	"net/http"
	"net/http/httptest"
	"reflect"
	"strings"
	"testing"
	"time"

	"github.com/fxamacker/cbor/v2"
	"github.com/gofiber/fiber/v3/binder"
	"github.com/shamaton/msgpack/v3"
	"github.com/stretchr/testify/require"
	"github.com/valyala/fasthttp"
)

const helloWorld = "hello world"

// go test -run Test_returnErr -v
func Test_returnErr(t *testing.T) {
	app := New()
	c := app.AcquireCtx(&fasthttp.RequestCtx{})

	err := c.Bind().WithAutoHandling().returnErr(nil)
	require.NoError(t, err)
}

// go test -run Test_AcquireReleaseBind -v
func Test_AcquireReleaseBind(t *testing.T) {
	b := AcquireBind()
	b.dontHandleErrs = false
	b.skipValidation = true
	b.ctx = &DefaultCtx{}
	ReleaseBind(b)

	b2 := AcquireBind()
	require.Nil(t, b2.ctx)
	require.True(t, b2.dontHandleErrs)
	require.False(t, b2.skipValidation)
	ReleaseBind(b2)
}

// go test -run Test_Bind_Query -v
func Test_Bind_Query(t *testing.T) {
	t.Parallel()
	app := New(Config{
		EnableSplittingOnParsers: true,
	})
	c := app.AcquireCtx(&fasthttp.RequestCtx{})

	type Query struct {
		Name  string
// ... (2338 more lines)

Domain

Subdomains

Dependencies

  • bytes

Frequently Asked Questions

What does bind_test.go do?
bind_test.go is a source file in the fiber codebase, written in go. It belongs to the FiberCore domain, Context subdomain.
What functions are defined in bind_test.go?
bind_test.go defines 54 function(s): BenchmarkBind_All, Benchmark_Bind_Body_CBOR, Benchmark_Bind_Body_Form, Benchmark_Bind_Body_Form_Map, Benchmark_Bind_Body_JSON, Benchmark_Bind_Body_MsgPack, Benchmark_Bind_Body_MultipartForm, Benchmark_Bind_Body_MultipartForm_Nested, Benchmark_Bind_Body_XML, Benchmark_Bind_Cookie, and 44 more.
What does bind_test.go depend on?
bind_test.go imports 1 module(s): bytes.
Where is bind_test.go in the architecture?
bind_test.go is located at bind_test.go (domain: FiberCore, subdomain: Context).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free