Documentation
¶
Overview ¶
Package envvar centralises the small env-var validation helpers used by the watcher and worker entry points. Each helper returns a descriptive error rather than calling os.Exit, so callers retain control of process exit semantics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBool ¶
ParseBool reads a boolean from the named environment variable. When the variable is unset or empty, defaultVal is returned. Otherwise the value is parsed via strconv.ParseBool, which accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False. Any other value returns an error consistent with the other env-var parsers in the codebase.
func RequireEnv ¶
RequireEnv returns the value of the named environment variable. It returns an error of the form "NAME is not set" when the variable is unset or empty, matching the wording previously emitted by the watcher and worker startup checks.
Types ¶
This section is empty.