Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Switch to using sayanarijit/expandvars for as_str_expanded() #157

Open
ravensorb opened this issue Apr 4, 2023 · 1 comment

Comments

@ravensorb
Copy link

Was curious if there was any interest in switching over to using https://github.com/sayanarijit/expandvars as it provides support for standard unix/go env variable expansion (can be helpful in setting default values).

Example of a config file with this syntax:

database:
   server: ${DATABASE_SERVER:-localhost}
   port: ${DATABASE_PORT:-5432}
   user: ${DATABASE_USERNAME:-app}
   passsword: ${DATABASE_PASSWORD}
@sampsyo
Copy link
Member

sampsyo commented Apr 6, 2023

Hi there! Confuse already has a mechanism for incorporating environment variables as default values (via a naming convention based on the structure of the config document). It's not entirely clear to me what this would add beyond that, and it would add some important complexity: it's an extra "programming language" beyond YAML that users need to understand.

If you're interested in this, could you elaborate on what's currently missing with our env-var system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants