Programming-Idioms

History of Idiom 205 > diff from v27 to v28

Edit summary for version 28 :
New Elixir implementation by user [quorauk]

Version 27

2020-06-10, 04:32:30

Version 28

2020-07-12, 00:25:04

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".

Extra Keywords
envvar os system
Extra Keywords
envvar os system
Code
foo = System.get_env("FOO", "none")
Doc URL
https://hexdocs.pm/elixir/System.html#get_env/2