Env

The os/Env module

The Env module allows to get and set environment variables.

import os/Env

Getting an environment variable:

path := Env get("PATH")

get will return null if the given environment variable is not set.

Setting an environment variable:

Env set("CFLAGS", "-Os")

Environment variables can be unset as well:

Env unset("PKG_CONFIG_PATH")