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

Support and test envPrefix on Sub #1100

Closed
wants to merge 3 commits into from

Conversation

afirth
Copy link

@afirth afirth commented Mar 24, 2021

This builds on #1056 and adds support and tests for EnvPrefix using Sub with AutomaticEnv

@TaylorOno commented on Dec 24, 2020
This PR fixes two issues with Sub():
Options were not copied from parent (e.g, automaticEnvApplied).
Environment variable names were wrong: Sub("x").Sub("y").Get("z") should look up env var x.y.z but was instead looking up z

Probably fixes:
#745
#507
#1012 (partial)
#801 (partial)

TaylorOno and others added 2 commits December 23, 2020 22:04
parents are tracked so sub(x).sub(y).GetString(z) looks up x.y.z
Sub inerits from automaticEnvApplied and envKeyReplacer
@CLAassistant
Copy link

CLAassistant commented Mar 24, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

👋 Thanks for contributing to Viper! You are awesome! 🎉

A maintainer will take a look at your pull request shortly. 👀

In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.

⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9

📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:

https://twitter.com/sagikazarmark/status/1306904078967074816

Thank you! ❤️

@afirth
Copy link
Author

afirth commented Mar 24, 2021

@TaylorOno I can't PR into yours as it's a fork, but you're welcome to cherry pick this into #1056 instead if you like. Thanks for your work, I wouldn't have figured this out otherwise.

@afirth
Copy link
Author

afirth commented Apr 6, 2021

closed as #1056 has cherry-picked it. Please merge #1056 :D

@afirth afirth closed this Apr 6, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants