Home / File/ readonly.go — fiber Source File

readonly.go — fiber Source File

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

File go FiberCore Context 1 imports 1 functions 2 classes

Entity Profile

Dependency Diagram

graph LR
  18baf2b2_b66f_56e4_e615_c0f2462374ff["readonly.go"]
  dcf29cf5_9135_b3bf_ae49_7e327a406037["unsafe"]
  18baf2b2_b66f_56e4_e615_c0f2462374ff --> dcf29cf5_9135_b3bf_ae49_7e327a406037
  style 18baf2b2_b66f_56e4_e615_c0f2462374ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

//go:build !s390x && !ppc64 && !ppc64le

package fiber

import (
	"unsafe"
)

//go:linkname runtimeRodata runtime.rodata
var runtimeRodata byte

//go:linkname runtimeErodata runtime.erodata
var runtimeErodata byte

func isReadOnly(p unsafe.Pointer) bool {
	start := uintptr(unsafe.Pointer(&runtimeRodata)) //nolint:gosec // converting runtime symbols
	end := uintptr(unsafe.Pointer(&runtimeErodata))  //nolint:gosec // converting runtime symbols
	addr := uintptr(p)
	return addr >= start && addr < end
}

Domain

Subdomains

Functions

Dependencies

  • unsafe

Frequently Asked Questions

What does readonly.go do?
readonly.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 readonly.go?
readonly.go defines 1 function(s): isReadOnly.
What does readonly.go depend on?
readonly.go imports 1 module(s): unsafe.
Where is readonly.go in the architecture?
readonly.go is located at readonly.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