glenvy/env

Strongly-typed access to environment variables.

Functions

pub fn get(name: String) -> Result(String, Nil)

Returns the value for the environment variable with the given name.

pub fn get_float(name: String) -> Result(Float, Nil)

Returns the value for the environment variable with the given name as a Float.

Returns Error(Nil) if the environment variable cannot be parsed as a Float.

pub fn get_int(name: String) -> Result(Int, Nil)

Returns the value for the environment variable with the given name as an Int.

Returns Error(Nil) if the environment variable cannot be parsed as an Int.

Search Document