readLimited() — fiber Function Reference
Architecture documentation for the readLimited() function in favicon.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD e9d059ec_d63b_2bc7_71c1_55724c53b880["readLimited()"] 3c25708a_7b43_d7ea_98a8_80dc1d4ca5c8["favicon.go"] e9d059ec_d63b_2bc7_71c1_55724c53b880 -->|defined in| 3c25708a_7b43_d7ea_98a8_80dc1d4ca5c8 82413163_2705_3ea3_1d0b_d6309162a7ab["New()"] 82413163_2705_3ea3_1d0b_d6309162a7ab -->|calls| e9d059ec_d63b_2bc7_71c1_55724c53b880 style e9d059ec_d63b_2bc7_71c1_55724c53b880 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/favicon/favicon.go lines 103–113
func readLimited(reader io.Reader, maxBytes int64) ([]byte, error) {
limit := maxBytes + 1
data, err := io.ReadAll(io.LimitReader(reader, limit))
if err != nil {
return nil, fmt.Errorf("favicon: read limited: %w", err)
}
if int64(len(data)) > maxBytes {
return nil, fmt.Errorf("favicon: file size exceeds max bytes %d", maxBytes)
}
return data, nil
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does readLimited() do?
readLimited() is a function in the fiber codebase, defined in middleware/favicon/favicon.go.
Where is readLimited() defined?
readLimited() is defined in middleware/favicon/favicon.go at line 103.
What calls readLimited()?
readLimited() is called by 1 function(s): New.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free