Documentation
¶
Overview ¶
Package config provides shared environment variable helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRequiredEnvNotSet = errors.New("required environment variable is not set")
Functions ¶
func EnvOrInt ¶
EnvOrInt returns an integer environment variable or a fallback default. Logs a warning if the value is set but not parseable or not positive.
func PostgresDSN ¶
func PostgresDSN() string
PostgresDSN builds a Postgres connection string from standard env vars. Defaults sslmode to "require"; allows "disable" for local dev but logs a warning.
func RequireEnv ¶
RequireEnv returns the value of an env var or a typed error when it is missing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.