Home / File/ router_test.go — fiber Source File

router_test.go — fiber Source File

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

File go FiberCore Routing 1 imports 86 functions 16 classes

Entity Profile

Dependency Diagram

graph LR
  326d7e00_9e4f_d854_0c78_b9c0c93e5537["router_test.go"]
  3c539dc4_ce70_7be5_43dc_5058a965884a["bufio"]
  326d7e00_9e4f_d854_0c78_b9c0c93e5537 --> 3c539dc4_ce70_7be5_43dc_5058a965884a
  style 326d7e00_9e4f_d854_0c78_b9c0c93e5537 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
// 📃 GitHub Repository: https://github.com/gofiber/fiber
// 📌 API Documentation: https://docs.gofiber.io

package fiber

import (
	"bufio"
	"context"
	"encoding/json"
	"errors"
	"io"
	"net/http"
	"net/http/httptest"
	"os"
	"reflect"
	"runtime"
	"strings"
	"sync"
	"testing"

	"github.com/gofiber/utils/v2"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"github.com/valyala/fasthttp"
)

var routesFixture routeJSON

func init() {
	dat, err := os.ReadFile("./.github/testdata/testRoutes.json")
	if err != nil {
		panic(err)
	}
	if err := json.Unmarshal(dat, &routesFixture); err != nil {
		panic(err)
	}
}

func Test_Route_Handler_Order(t *testing.T) {
	t.Parallel()

	app := New()

	var order []int

	handler1 := func(c Ctx) error {
		order = append(order, 1)
		return c.Next()
	}
	handler2 := func(c Ctx) error {
		order = append(order, 2)
		return c.Next()
	}
	handler3 := func(c Ctx) error {
		order = append(order, 3)
		return c.Next()
	}

	app.Get("/test", handler1, handler2, handler3, func(c Ctx) error {
// ... (2303 more lines)

Domain

Subdomains

Functions

Dependencies

  • bufio

Frequently Asked Questions

What does router_test.go do?
router_test.go is a source file in the fiber codebase, written in go. It belongs to the FiberCore domain, Routing subdomain.
What functions are defined in router_test.go?
router_test.go defines 86 function(s): Benchmark_App_MethodNotAllowed, Benchmark_App_MethodNotAllowed_Parallel, Benchmark_App_RebuildTree, Benchmark_App_RebuildTree_Parallel, Benchmark_Route_Match, Benchmark_Route_Match_Parallel, Benchmark_Route_Match_Root, Benchmark_Route_Match_Root_Parallel, Benchmark_Route_Match_Star, Benchmark_Route_Match_Star_Parallel, and 76 more.
What does router_test.go depend on?
router_test.go imports 1 module(s): bufio.
Where is router_test.go in the architecture?
router_test.go is located at router_test.go (domain: FiberCore, subdomain: Routing).

Analyze Your Own Codebase

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

Try Supermodel Free