On Wed, May 2, 2018 at 9:16 AM, Tong Sun <[email protected]> wrote:
>
>
>
> // now
> env := make(map[string]string)
> for _, e := range os.Environ() {
> sep := strings.Index(e, "=")
> env[e[0:sep]] = e[sep+1:]
> }
> // how to add env into data as ENV so that it can be accessed within
args:=map[string]interface{}{"ENV":env}
generic(templateStr,args)
> template,
> // e.g., {{.ENV.SHELL}}?
> }
>
>
>
> Thanks for your help!
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.