Unmarshalling env into nested struct? #1188
Unanswered
darrenparkinson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
If I have a .env file with the value:
I would expect this to unmarshal into a type as follows:
By doing this:
This doesn't seem to work though. It does if I replace
DB_DSN
withDB.DSN
in the config file.Any thoughts on what I'm doing wrong, or if this is not possible greatly appreciated.
Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions