Documentation
¶
Overview ¶
Package envvar provides utilities for working with environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
Expand replaces ${VAR_NAME}, ${VAR_NAME:-default}, and ${VAR_NAME:=default} placeholders with their environment variable values. If a referenced environment variable is not set:
- With default syntax ${VAR:-default} or ${VAR:=default}: uses the default value
- Without default ${VAR}: uses empty string and logs a warning
func ExpandBytes ¶
ExpandBytes expands environment variables in byte slice content. This is a convenience wrapper for expanding YAML or other file content.
func ExpandBytesWithLookup ¶ added in v5.78.2
ExpandBytesWithLookup expands placeholders in byte slice content using the provided lookup function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.