Skip to main content

Mojo function

env_get_bool

env_get_bool[name: StringLiteral]() -> Bool

Try to get an boolean-valued define. Compilation fails if the name is not defined or the value is neither True or False.

Parameters:

  • name (StringLiteral): The name of the define.

Returns:

An boolean parameter value.

env_get_bool[name: StringLiteral, default: Bool]() -> Bool

Try to get an bool-valued define. If the name is not defined, return a default value instead. The boolean must be either True or False.

Parameters:

  • name (StringLiteral): The name of the define.
  • default (Bool): The default value to use.

Returns:

An bool parameter value.