-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add mapstructure tags to config structures for viper config read package support #69
Comments
I can do this since it's 1 minute solution :) |
Thank you, I want to ask a question. If we did this, what would be their benefits? |
Right now we can't read configs with viper package by just parsing viper data to Our current logic is parsing config file to another struct and map it to I don't know if i explained well. I can provide more detail. |
@emrekosen I understand your concerns you are right. If we remove the inline tag and add mapstructure, will it work the same? We need to test it. If you find an available time I would be happy to review your pull request. |
@mhmtszr No we don't need to remove inline tag, we can use both yaml and mapstructure. With a tag like |
Is your feature request related to a problem? Please describe.
When using viper package to read config files, we can't parse config directly to struct provided by package which is
config.Connector
. It's because viper uses mapstructure tags and we have yaml tags. Withyaml:",inline"
tag dcp field inconfig.Connector
, viper unable to read inlined config fields.Describe the solution you'd like
If we add
mapstructure
tags to config struct it will be resolved.The text was updated successfully, but these errors were encountered: