-
Notifications
You must be signed in to change notification settings - Fork 303
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
Added greater granularity for boolean environment variables #511
Added greater granularity for boolean environment variables #511
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @alessandrodetta !
The only ask is to move utility function to a more appropriate place, see my comments.
As for CI failure, try merging from master, I have updated golang version to 1.21 there |
2dd484f
to
390166f
Compare
@undera Probably you got notified, but I have updated the solution with the changes you reviewed. I have rebased the feature branch so that now is on top of the current main branch so that I don't need to re-create a PR. Your idea was to create a new PR with my changes from main itself or like this is ok? |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #511 +/- ##
==========================================
+ Coverage 29.72% 30.18% +0.46%
==========================================
Files 10 10
Lines 1329 1335 +6
==========================================
+ Hits 395 403 +8
+ Misses 893 891 -2
Partials 41 41 ☔ View full report in Codecov by Sentry. |
Please do another pull from master, there is small issue with static check setup in CI |
7081292
to
ee11461
Compare
ee11461
to
4aeec65
Compare
Awesome! Thanks! |
Changes Proposed
See suggestion in #510.
I preferred to issue this pull request as draft because this is my first open source pull request.
I will suggest in the future anyway to add implementation for some kind of structure (maybe a map?) to store parsed environment variables for both boolean and strings (in already created env.go) so that the environment variables are parsed for their correct values in one single point in code and not sparsely in different files as it is now and also so that reading multiple times their values doesn't involve more calls to the OS.
Furthermore, somehow I would also suggest integrating the management of program options into this reasoning, in order to clearer management since in some cases there is a relationship between the two.
Check List