Test_Static_MaxAge() — fiber Function Reference
Architecture documentation for the Test_Static_MaxAge() function in static_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 860a6089_8c76_d9ba_9baf_8ec39c2faba2["Test_Static_MaxAge()"] f26a2d79_1e01_f027_82eb_45c4308747e8["static_test.go"] 860a6089_8c76_d9ba_9baf_8ec39c2faba2 -->|defined in| f26a2d79_1e01_f027_82eb_45c4308747e8 style 860a6089_8c76_d9ba_9baf_8ec39c2faba2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/static/static_test.go lines 102–116
func Test_Static_MaxAge(t *testing.T) {
t.Parallel()
app := fiber.New()
app.Get("/*", New("../../.github", Config{
MaxAge: 100,
}))
resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/index.html", http.NoBody))
require.NoError(t, err, "app.Test(req)")
require.Equal(t, 200, resp.StatusCode, "Status code")
require.NotEmpty(t, resp.Header.Get(fiber.HeaderContentLength))
require.Equal(t, "text/html; charset=utf-8", resp.Header.Get(fiber.HeaderContentType))
require.Equal(t, "public, max-age=100", resp.Header.Get(fiber.HeaderCacheControl), "CacheControl Control")
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Static_MaxAge() do?
Test_Static_MaxAge() is a function in the fiber codebase, defined in middleware/static/static_test.go.
Where is Test_Static_MaxAge() defined?
Test_Static_MaxAge() is defined in middleware/static/static_test.go at line 102.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free