-
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
Issue-105 Support time.Duration in viper.Unmarshal #205
Conversation
This changeset looks very much like the code used in Fixing Issue #105 is something I'd certainly like to see done, but could this patch be refactored so that |
I will try to take a look at this PR soon. In the meantime, if the suggestion by @jyellick could be implemented, that would be great. |
@yauhen-l it seems straight forward enough to add the hook to the |
@awishformore, I will take a look in the evening |
@awishformore, @jyellick please review |
Just add DecodeHook to DecoderConfig.
Allows to unmarshal into struct with time.Duration fields: