envvar

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func ParseBool(name string, defaultVal bool) (bool, error)

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

func RequireEnv(name string) (string, error)

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.

Jump to

Keyboard shortcuts

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