Documentation
¶
Index ¶
- Constants
- func BoolPtr(b bool) *bool
- func CollectionNote(detail string) string
- func EnvLocaleC() []string
- func FileExistsRegular(path string) bool
- func HostIsContainerized() *bool
- func IntPtr(n int) *int
- func QueryDistroPackageVersion(packageNames []string) string
- func ReadFileBounded(path string, maxBytes int64) ([]byte, error)
- func ScanContextError(ctx context.Context) error
- func StringPtr(s string) *string
- func TruncateRunes(s string, max int) string
Constants ¶
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 ¶
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 FileExistsRegular ¶ added in v0.5.0
FileExistsRegular reports whether path exists and is not a directory.
func HostIsContainerized ¶ added in v0.5.0
func HostIsContainerized() *bool
HostIsContainerized reports dockerenv/cgroup hints (best-effort).
func QueryDistroPackageVersion ¶ added in v0.28.0
QueryDistroPackageVersion returns the full distro package version for the first matching package name (e.g., "2.4.57-2~deb12u2" for apache2 on Debian). Tries dpkg-query (Debian/Ubuntu) then rpm (RHEL/CentOS). Returns "" on failure.
func ReadFileBounded ¶ added in v0.4.0
ReadFileBounded reads at most maxBytes from path (regular file open).
func ScanContextError ¶ added in v0.4.0
ScanContextError returns ctx.Err() when ctx is non-nil and done.
func TruncateRunes ¶
TruncateRunes truncates to at most max runes.
Types ¶
This section is empty.