Home / File/ helpers.go — fiber Source File

helpers.go — fiber Source File

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

File go FiberCore Context 1 imports 29 functions 10 classes

Entity Profile

Dependency Diagram

graph LR
  bec0e401_e4cd_f765_6df3_a79059073e50["helpers.go"]
  c0b86961_3ef1_0168_52fc_98627566ed27["bytes"]
  bec0e401_e4cd_f765_6df3_a79059073e50 --> c0b86961_3ef1_0168_52fc_98627566ed27
  style bec0e401_e4cd_f765_6df3_a79059073e50 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 (
	"bytes"
	"crypto/tls"
	"errors"
	"fmt"
	"io"
	"net"
	"os"
	"path/filepath"
	"reflect"
	"slices"
	"strconv"
	"strings"
	"sync"
	"time"
	"unsafe"

	"github.com/gofiber/utils/v2"

	"github.com/gofiber/fiber/v3/log"

	"github.com/valyala/bytebufferpool"
	"github.com/valyala/fasthttp"
)

// acceptedType is a struct that holds the parsed value of an Accept header
// along with quality, specificity, parameters, and order.
// Used for sorting accept headers.
type acceptedType struct {
	params      headerParams
	spec        string
	quality     float64
	specificity int
	order       int
}

const noCacheValue = "no-cache"

// Pre-allocated byte slices for accept header parsing
var (
	semicolonQEquals = []byte(";q=")
	wildcardAll      = []byte("*/*")
	wildcardSuffix   = []byte("/*")
)

type headerParams map[string][]byte

// getTLSConfig returns a net listener's tls config
func getTLSConfig(ln net.Listener) *tls.Config {
	if ln == nil {
		return nil
	}

	type tlsConfigProvider interface {
// ... (1032 more lines)

Domain

Subdomains

Dependencies

  • bytes

Frequently Asked Questions

What does helpers.go do?
helpers.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 helpers.go?
helpers.go defines 29 function(s): Convert, IsMethodIdempotent, IsMethodSafe, acceptsLanguageOfferBasic, acceptsLanguageOfferExtended, acceptsOffer, acceptsOfferType, defaultString, forEachMediaRange, genericParseType, and 19 more.
What does helpers.go depend on?
helpers.go imports 1 module(s): bytes.
Where is helpers.go in the architecture?
helpers.go is located at helpers.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