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
I read in other issues the opinion that there should be one configuration file, and the rest be data. I have a counterexample to that.
I currently need user-switchable configurations for what the app will be doing as the main configuration file. There will be sample configurations for different tasks that users can easily copy. Independently of that, I want database configuration that will not be modified that often. Consequently, I expect to have config.yaml and db.yaml in my .config/APPNAME directory. So currently I have something like this:
Cool! Yes, this seems like a good argument in favor of the way Confuse merges configuration sources.
Your way doesn’t look bad at all. But there is a set_file method here that parses and adds a source from a filename, but it doesn’t include the path manipulation or the error handler. That would at least help make your code a little simpler. 😃
I read in other issues the opinion that there should be one configuration file, and the rest be data. I have a counterexample to that.
I currently need user-switchable configurations for what the app will be doing as the main configuration file. There will be sample configurations for different tasks that users can easily copy. Independently of that, I want database configuration that will not be modified that often. Consequently, I expect to have
config.yaml
anddb.yaml
in my.config/APPNAME
directory. So currently I have something like this:However, it feels like I'm doing something dirty. :) Is there a better way to do something like this?
The text was updated successfully, but these errors were encountered: