Env
The Env registry provides functions for accessing and managing environment variables, enabling dynamic configuration of your applications based on the runtime environment.
env
Env(key string) string{{ env "INVALID" }} // Output: ""
{{ "PATH" | env }} // Output(will be different): "/usr/bin:/bin:/usr/sbin:/sbin"expandEnv
ExpandEnv(str string) string{{ "Path is $PATH" | expandEnv }} // Output(will be different): "Path is /usr/bin:/bin:/usr/sbin:/sbin"Last updated