Skip to content
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

Don't touch struct fields without env tag #310

Closed
corani opened this issue May 23, 2024 · 1 comment · Fixed by #318
Closed

Don't touch struct fields without env tag #310

corani opened this issue May 23, 2024 · 1 comment · Fixed by #318
Labels

Comments

@corani
Copy link

corani commented May 23, 2024

After #306 it appears all nil fields in the struct will be initialized to an empty value, even fields without an env tag.

I believe this initialization should only happen if (1) the field has an env tag and (2) the specified environment variable exists (with 1 being critical and 2 debatable).

@caarlos0
Copy link
Owner

hey, good catch!

should be fixed by #318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants