Documentation
¶
Overview ¶
Package env validates environment variables against a schema and example file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
Errors []ValidationError
}
Result holds the outcome of env validation.
func ValidateWithDefaults ¶
func ValidateWithDefaults(envFile, exampleFile string, schema map[string]config.EnvVar) (Result, map[string]string)
ValidateWithDefaults validates env vars and injects schema defaults for missing keys. It returns the validation result and a map of keys that were filled with defaults.
type ValidationError ¶
ValidationError represents a single env variable validation failure.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Error implements the error interface.
Click to show internal directories.
Click to hide internal directories.