envoy

Functions

pub fn all() -> Dict(String, String)

Get all the environment variables.

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

Get an environment variable by name.

get("HOME")
// -> Ok("/home/lucy")
get("WORLD_PEACE")
// -> Error(Nil)
pub fn set(name: String, value: String) -> Nil

Set an environment variable.

get("FAVOURITE_COLOUR")
// -> Error(Nil)
set("FAVOURITE_COLOUR", "Pink")

get("FAVOURITE_COLOUR")
// -> Ok("Pink")
pub fn unset(name: String) -> Nil

Unset an environment variable.

set("FAVOURITE_COLOUR", "Pink")

get("FAVOURITE_COLOUR")
// -> Ok("Pink")

unset("FAVOURITE_COLOUR")

get("FAVOURITE_COLOUR")
// -> Error(Nil)
Search Document