Skip to content

Env

Spice
import "std/os/env";

Functions

getEnv

Spice
public f<Result<string>> getEnv(string name)

Returns the content of an environment variable as string.

Parameters

Name Type Description
name string

Returns: Result<string> — Env variable content or error

setEnv

Spice
public f<bool> setEnv(string name, string value)

Sets the content of an environment variable to the given value.

Parameters

Name Type Description
name string
value string

Returns: bool — Successful or not