-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
When working with configurations, sometimes they get overwritten depending on the origin. The order of the defaulting is discussable, but I think it is
- read environment vars
- read configuration file 1, maybe from server
- read local configuration file
- read arguments
and of course starting with settings that the programmer considers perfect as defaults.
type Settings { showAsWindow: bool; windowXsize: int; windowYsize: int }
let DefaultSettings = { true; 1024; 768 }
wouldn't it be nice to have a configuration chain like
let setup = DefaultSettings
|> EnvConfig.Get<Settings>
|> IniConfig.Get<Settings>
|> ArgConfig.Get<Settings>
Is this possible somehow?
Metadata
Metadata
Assignees
Labels
No labels