Skip to main content

Module config

Module config 

Source
Expand description

Loading and validating config.yaml.

template_path: "~/projects/aoc/{{year}}/day{{pad day}}/{{language}}"
cookie: "<advent of code session cookie>"
editor: "code"

Only template_path is required. The template is parsed - and therefore validated - at load time rather than on first use.

The cookie may instead live in a COOKIE_FILE_NAME file beside config.yaml, holding nothing but the cookie, so the configuration itself carries no secret and can be committed alongside other dotfiles.

Structs§

Config
Validated configuration.

Enums§

ConfigError
Errors produced while loading configuration.

Constants§

COOKIE_FILE_NAME
The file beside config.yaml read as a raw session cookie when the configuration itself does not carry one.
DEFAULT_EDITOR
The default editor launched by aoc code.

Type Aliases§

Warning
A non-fatal problem noticed while loading configuration.