System.fetch_env
You're seeing just the function
fetch_env
, go back to System module for more information.
Specs
Returns the value of the given environment variable or :error
if not found.
If the environment variable varname
is set, then {:ok, value}
is returned
where value
is a string. If varname
is not set, :error
is returned.
Examples
iex> System.fetch_env("PORT")
{:ok, "4000"}
iex> System.fetch_env("NOT_SET")
:error