Home / File/ hooks_test.go — fiber Source File

hooks_test.go — fiber Source File

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

File go FiberClient Hooks 1 imports 9 functions 2 classes

Entity Profile

Dependency Diagram

graph LR
  9a0809c0_d0fc_f9e7_3fc4_bf20360f9ebf["hooks_test.go"]
  c0b86961_3ef1_0168_52fc_98627566ed27["bytes"]
  9a0809c0_d0fc_f9e7_3fc4_bf20360f9ebf --> c0b86961_3ef1_0168_52fc_98627566ed27
  style 9a0809c0_d0fc_f9e7_3fc4_bf20360f9ebf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

package client

import (
	"bytes"
	"encoding/xml"
	"fmt"
	"io"
	"net"
	"net/url"
	"path/filepath"
	"strings"
	"testing"

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

func Test_Rand_String(t *testing.T) {
	t.Parallel()
	tests := []struct {
		name string
		args int
	}{
		{
			name: "test generate",
			args: 16,
		},
		{
			name: "test generate smaller string",
			args: 8,
		},
		{
			name: "test generate larger string",
			args: 32,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			t.Parallel()
			got, err := unsafeRandString(tt.args)
			require.NoError(t, err)
			require.Len(t, got, tt.args)
		})
	}

	t.Run("valid characters", func(t *testing.T) {
		t.Parallel()
		got, err := unsafeRandString(32)
		require.NoError(t, err)
		for i := 0; i < len(got); i++ {
			require.Contains(t, letterBytes, string(got[i]))
		}
	})
}

func Test_Parser_Request_URL(t *testing.T) {
	t.Parallel()
// ... (765 more lines)

Domain

Subdomains

Classes

Dependencies

  • bytes

Frequently Asked Questions

What does hooks_test.go do?
hooks_test.go is a source file in the fiber codebase, written in go. It belongs to the FiberClient domain, Hooks subdomain.
What functions are defined in hooks_test.go?
hooks_test.go defines 9 function(s): Benchmark_Parser_Request_Body_File, Test_Client_Logger_Debug, Test_Client_Logger_DisableDebug, Test_Parser_Request_Body, Test_Parser_Request_Header, Test_Parser_Request_URL, Test_Rand_String, newBenchmarkRequest, releaseBenchmarkRequest.
What does hooks_test.go depend on?
hooks_test.go imports 1 module(s): bytes.
Where is hooks_test.go in the architecture?
hooks_test.go is located at client/hooks_test.go (domain: FiberClient, subdomain: Hooks, directory: client).

Analyze Your Own Codebase

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

Try Supermodel Free