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

Could viper support merge two config files? #938

Closed
ahuigo opened this issue Jul 26, 2020 · 2 comments
Closed

Could viper support merge two config files? #938

ahuigo opened this issue Jul 26, 2020 · 2 comments

Comments

@ahuigo
Copy link

ahuigo commented Jul 26, 2020

I have serval env config file:

config/
    default.yaml
    conf_dev.yaml
    conf_test.yaml
    conf_production.yaml

Could viper support merge two config files(e.g. default.yaml+conf_dev.yaml )

@sagikazarmark
Copy link
Collaborator

Currently Viper only supports a single file source. If/when #889 gets implemented, this should be possible. Closing as the linked issue covers this use case and we can track it there.

@ahuigo
Copy link
Author

ahuigo commented Jun 26, 2024

A demo to merge multiple yaml files via viper:
https://tonybai.com/2022/09/20/use-viper-to-do-merge-of-yml-configuration-files/

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