History of Idiom 205 > diff from v19 to v20
Edit summary for version 20 by programming-idioms.org:
New Go implementation by user [programming-idioms.org]
New Go implementation by user [programming-idioms.org]
↷
Version 19
2019-10-01, 08:34:21
Version 20
2019-10-01, 08:39:29
Idiom #205 Get an environment variable
Read an environment variable with the name "FOO" and assign it to the string variable foo. If it does not exist or if the system does not support environment variables, assign a value of "none".
Idiom #205 Get an environment variable
Read an environment variable with the name "FOO" and assign it to the string variable foo. If it does not exist or if the system does not support environment variables, assign a value of "none".
Comments bubble
To distinguish between an empty value and an unset value, use os.LookupEnv.