fileutil

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MaxCertFileSize int64 = 1 << 20 // 1 MB

MaxCertFileSize is the upper bound for reading certificate, key, and config files. Prevents OOM from maliciously large files.

Variables

This section is empty.

Functions

func ReadLimited

func ReadLimited(path string, maxBytes int64) ([]byte, error)

ReadLimited reads a file up to maxBytes. Returns an error if the file exceeds the limit.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL