gucci
gucci copied to clipboard
Restore env and expandenv.
Although the ability to reference environment variables with the {{ .VARNAME }} syntax is useful, it throws when VARNAME is not defined.
It is sometimes useful to have the shell behaviour of an undefined environment variable expanding to the empty string.
For instance, when FOO is undefined, template It is set to "{{ .FOO }}" throws map has no entry for key "FOO" when it might be desirable for it to expand to It is set to "" instead.
With env, the above is possible. It is set to "{{ env "FOO" }}" works as expected.
#14 added Sprig functions, which is nice, and removed env and expandenv with the justification that "Helm doesn't have them" but I think they are useful enough to keep.