如何在Gomplate数组中获取环境变量?

I need to create an array of some Environment variables in gomplate template and print in order to see if environment variables are set properly.

I tried from the docs https://docs.gomplate.ca/syntax/#indexing-arrays-and-maps but there is no mention to declare env variable in an array.

Example,

{{ $o := jsonArray `[(getenv "USER")]` }}

{{ range ($o) }}
    {{ . }}
{{ end }}

It converts the getenv "USER" into a string and does not get my "USER" environment variable.

The output it returns is (getenv "USER")

Instead it should return pineapple (which is an example user env variable)