Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RegexEnvVar = regexp.MustCompile(`\$([a-zA-Z_][a-zA-Z0-9_]*)|\$\{([a-zA-Z_][a-zA-Z0-9_]*)(:-([^}]*))?\}`)
)
Functions ¶
func ExpandEnvVar ¶ added in v1.1.0
func ExpandEnvVars ¶
func ExpandEnvVars(s interface{})
ExpandEnvVars expands environment variables in a struct recusively. It expands the string fields in the struct and its sub-structs including a map with string values.
Types ¶
type EnvMap ¶
func (EnvMap) Expand ¶
func (em EnvMap) Expand(t interface{})
Expand recursively expands string files from a struct.
func (EnvMap) LoadSystem ¶
func (em EnvMap) LoadSystem()
LoadSystem loads os.Environ() into this map
func (EnvMap) NewExpander ¶
Expand performs shell expansion using this EnvMap.
Click to show internal directories.
Click to hide internal directories.