-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Unmarshal methods does not work with embedded structures #1050
Comments
👋 Thanks for reporting! A maintainer will take a look at your issue 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, https://twitter.com/sagikazarmark/status/1306904078967074816 Thank you! ❤️ |
To decode the keys into an embedded structure, I used the |
Unfortunately, that doesn't work with mapstructure (the library used under the hood). You need to use |
Although this is explicitly mentioned in the documentation, I added a troubleshooting section to the readme: https://github.com/spf13/viper#unmarshaling-doesnt-work |
Expected behavior (what you expected to happen):
Actual behavior (what actually happened):
Repl.it link: https://repl.it/@toby3d/viper#main_test.go
Code reproducing the issue:
Environment:
The text was updated successfully, but these errors were encountered: