It worked. Exactly what I was looking for.
Thanks a lot.

On Sun, 10 May, 2020, 7:44 AM Kurtis Rader, <kra...@skepticism.us> wrote:

> On Sat, May 9, 2020 at 7:04 PM Amarjeet Anand <sarvmar...@gmail.com>
> wrote:
>
>> Is it possible to set environment variables while running my app like...
>>
>> *go run -env_var1="val1" main.go*
>>
>
> Is there some reason you can't simply do this
>
>     env_var1=val1 go run main.go
>
> Or this
>
>     env env_var1=val1 go run main.go
>
> if your shell doesn't support the POSIX shell syntax for temporary
> modification of the environment a command inherits?
>
> --
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAORUUQX92EpyxFgO_5AkZgiFMd2wqTXxayNx%2BEXAOivWLvSjxQ%40mail.gmail.com.

Reply via email to