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

Fixed AllKeys() to include env values added with BindEnv() #264

Merged
merged 2 commits into from
Oct 23, 2016

Conversation

benoitmasson
Copy link
Contributor

Bug fixed in AllKeys() by doing an explicit cast of v.env to a map[string]interface{}.

This will in turn repair AllSettings() and Unmarshal(), which also ignored environment values added manually.

Fixes issue raised in this comment in PR #195, and mentioned at the end of Issue #188.

@benoitmasson benoitmasson changed the title Fixed AllKeys() to include env values added with BindEnv() Fixed AllKeys() to include env values added with BindEnv() Oct 23, 2016
To make sure AllSettings() and Unmarshal() will consider environment
variables added with BindEnv().
Cast was not working, and v.env wasn't used when merging keys.

Rewrote explicit and specific casts for maps storing strings or FlagValues.
@bep bep merged commit 285f151 into spf13:master Oct 23, 2016
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.

2 participants