bind_test.go — fiber Source File
Architecture documentation for bind_test.go, a go file in the fiber codebase. 1 imports, 0 dependents.
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
Functions
- 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()
- Benchmark_Bind_Cookie_Map()
- Benchmark_Bind_Header()
- Benchmark_Bind_Header_Map()
- Benchmark_Bind_Query()
- Benchmark_Bind_Query_Comma()
- Benchmark_Bind_Query_Default()
- Benchmark_Bind_Query_Map()
- Benchmark_Bind_Query_WithParseParam()
- Benchmark_Bind_RespHeader()
- Benchmark_Bind_RespHeader_Map()
- Benchmark_Bind_URI()
- Benchmark_Bind_URI_Map()
- Test_AcquireReleaseBind()
- Test_Bind_All()
- Test_Bind_All_Query_Precedence()
- Test_Bind_All_StructValidator()
- Test_Bind_All_Uri_Precedence()
- Test_Bind_Body()
- Test_Bind_Body_WithSetParserDecoder()
- Test_Bind_Cookie()
- Test_Bind_Cookie_Map()
- Test_Bind_Cookie_Schema()
- Test_Bind_Cookie_WithSetParserDecoder()
- Test_Bind_CustomBinder()
- Test_Bind_Form_Map_SkipsStructValidator()
- Test_Bind_Header()
- Test_Bind_Header_Map()
- Test_Bind_Header_Schema()
- Test_Bind_Header_WithSetParserDecoder()
- Test_Bind_Query()
- Test_Bind_Query_Map()
- Test_Bind_Query_Schema()
- Test_Bind_Query_WithSetParserDecoder()
- Test_Bind_RepeatParserWithSameStruct()
- Test_Bind_RespHeader()
- Test_Bind_RespHeader_Map()
- Test_Bind_SkipValidation()
- Test_Bind_SkipValidation_Usage()
- Test_Bind_StructValidator()
- Test_Bind_URI()
- Test_Bind_URI_Map()
- Test_Bind_ValidateStruct_NilTarget()
- Test_Bind_WithAutoHandling()
- Test_returnErr()
Types
Dependencies
- bytes
Source
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