You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue or pull request for this?
I have searched the existing issues and pull requests
Feature description
Currently, all config structs contain Option<>. These options have some value if it was set in the configuration file or environment variables, and None otherwise. Default values are not taken into consideration at this point.
Whenever an option is used in the application code, the consumer must take care of unpacking the Option<> and substituting a default value if needed. If an option is used in multiple places, this unpacking needs to be repeated every time.
Desired solution
All options should be initialised with their respective default values when loading the config. This would have two benefits:
All default values can be defined in one place.
Handling of config options is simplied throughout the code.
Alternatives considered
none
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue or pull request for this?
Feature description
Currently, all config structs contain
Option<>
. These options have some value if it was set in the configuration file or environment variables, andNone
otherwise. Default values are not taken into consideration at this point.Whenever an option is used in the application code, the consumer must take care of unpacking the
Option<>
and substituting a default value if needed. If an option is used in multiple places, this unpacking needs to be repeated every time.Desired solution
All options should be initialised with their respective default values when loading the config. This would have two benefits:
Alternatives considered
none
Additional context
No response
The text was updated successfully, but these errors were encountered: