shared

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultConfigFileReadLimit int64 = 96 << 10

DefaultConfigFileReadLimit caps typical config file reads (web server snippets, logrotate, cron, etc.).

Variables

This section is empty.

Functions

func CollectionNote

func CollectionNote(detail string) string

CollectionNote returns a stable human-readable reason (max ~512 chars for schema).

func EnvLocaleC

func EnvLocaleC() []string

EnvLocaleC forces C locale for deterministic CLI output parsing.

func ReadFileBounded added in v0.4.0

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

ReadFileBounded reads at most maxBytes from path (regular file open).

func ScanContextError added in v0.4.0

func ScanContextError(ctx context.Context) error

ScanContextError returns ctx.Err() when ctx is non-nil and done.

func TruncateRunes

func TruncateRunes(s string, max int) string

TruncateRunes truncates to at most max runes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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