Test_App_GetString() — fiber Function Reference
Architecture documentation for the Test_App_GetString() function in app_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 891fb8d5_0649_e609_4eb0_02a6347cd183["Test_App_GetString()"] e728fdd2_242f_706b_c1d2_041b3d6badb5["app_test.go"] 891fb8d5_0649_e609_4eb0_02a6347cd183 -->|defined in| e728fdd2_242f_706b_c1d2_041b3d6badb5 style 891fb8d5_0649_e609_4eb0_02a6347cd183 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
app_test.go lines 1297–1318
func Test_App_GetString(t *testing.T) {
t.Parallel()
heap := string([]byte("fiber"))
appMutable := New()
same := appMutable.GetString(heap)
if unsafe.StringData(same) != unsafe.StringData(heap) { //nolint:gosec // compare pointer addresses
t.Error("expected original string when immutable is disabled")
}
appImmutable := New(Config{Immutable: true})
copied := appImmutable.GetString(heap)
if unsafe.StringData(copied) == unsafe.StringData(heap) { //nolint:gosec // compare pointer addresses
t.Error("expected a copy for heap-backed string when immutable is enabled")
}
literal := "fiber"
sameLit := appImmutable.GetString(literal)
if unsafe.StringData(sameLit) != unsafe.StringData(literal) { //nolint:gosec // compare pointer addresses
t.Error("expected original literal when immutable is enabled")
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_App_GetString() do?
Test_App_GetString() is a function in the fiber codebase, defined in app_test.go.
Where is Test_App_GetString() defined?
Test_App_GetString() is defined in app_test.go at line 1297.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free