-
-
Notifications
You must be signed in to change notification settings - Fork 39
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "separator" to parse nested structs #55
Comments
I want to mention one alternative using
|
This was referenced Mar 1, 2021
Worth noting that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃挕 Feature description
In config-rs, there's an option to define a
separator
which allow users to structure their env vars. I think an example will illustrate better:If we define a separator, let's say "__", we could create this
Config
by settingDATABASE__NAME=foo
.Would it be possible and desirable for
envy
to include it?Alternatives
It is possible to get the same behavior using the
flatten
attribute from serde (as noticed in #15). The drawback is that it demands a good amount of boilerplate because we would have to serde'srename
every field in the nested struct if we wanted to use this separator idea.The text was updated successfully, but these errors were encountered: