Documentation
¶
Overview ¶
Package envutil parses process environment variables with the canonical, fail-closed rules shared by the Orka binaries. Blank values always yield the fallback; malformed values are reported to the caller, which decides whether to exit or degrade.
Index ¶
- func Bool(name string) (bool, error)
- func Duration(name string, fallback time.Duration) (time.Duration, error)
- func Int(name string, fallback int) (int, error)
- func Int64(name string, fallback int64) (int64, error)
- func MustDuration(name string, fallback time.Duration) time.Duration
- func MustInt(name string, fallback int) int
- func MustInt64(name string, fallback int64) int64
- func MustPositiveInt(name string, fallback int) int
- func String(name, fallback string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int ¶
Int parses name as a canonical base-10 platform-sized integer. Non-canonical spellings such as a leading "+" or zero padding are rejected.
func MustDuration ¶
MustDuration is Duration for process startup: a malformed value exits the process with "invalid NAME".
func MustInt ¶
MustInt is Int for process startup: a malformed value exits the process with "invalid NAME".
func MustInt64 ¶
MustInt64 is Int64 for process startup: a malformed value exits the process with "invalid NAME".
func MustPositiveInt ¶
MustPositiveInt is Int for process startup: a malformed or non-positive value exits the process with "invalid NAME".
Types ¶
This section is empty.