Expand description

Config handles loading of, and updating the Context from, a configuration file.

The config will look in several pre-determined (platform specific) locations. If a valid configuration file is found, it’s values are loaded. Note that later layers may override values from previous layers.

  • System configuration files (currently none are defined)
  • User configuration files
    • Linux
      • $XDG_CONFIG_HOME/seaplane/
      • $HOME/.config/seaplane/
      • $HOME/.seaplane/
    • macOS
      • $HOME/Library/ApplicationSupport/io.Seaplane.seaplane/
      • $HOME/.config/seaplane/
      • $HOME/.seaplane/
    • Windows
      • %RoamingAppData%/Seaplane/seaplane/config/
      • $HOME/.config/seaplane/
      • $HOME/.seaplane/
  • The CLI’s --config flag

Note the CLI also provides a --no-override flag that prevents later configuration files from overriding previously discovered configuration layers. In this case the final layer “wins” and all previous layers are ignored. i.e. using --config will cause only that CLI provided configuration to be considered and not any of those in the filesystem.

See also the CONFIGURATION_SPEC.md in this repository

Structs

Traits

Extends a configuration instance with overriding config