-
Notifications
You must be signed in to change notification settings - Fork 55
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
refactor: try to refactor the load config code to 2 clear pathes #814
base: main
Are you sure you want to change the base?
Conversation
d3f9d8c
to
f6565fc
Compare
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.
Hi @qs-wang,
Thanks for the refactoring. I've left a comment below about a minor detail I noticed.
6a77bba
to
91d412a
Compare
…th clearly - split loadConfigByProvider to a separate method to make if/else statemtn clearer - split loadPrivateConfigFromFile to a separate method for reuse in if/else branches Signed-off-by: Q.s <[email protected]>
91d412a
to
7123958
Compare
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 #814 +/- ##
==========================================
- Coverage 46.51% 46.20% -0.31%
==========================================
Files 62 62
Lines 3603 3627 +24
==========================================
Hits 1676 1676
- Misses 1805 1829 +24
Partials 122 122 ☔ View full report in Codecov by Sentry. |
7123958
to
989def7
Compare
Signed-off-by: Q.s <[email protected]>
989def7
to
f4834ce
Compare
I tried to make some changes for my own purpose. While I read the code although the code works perfectly, it a little bit hard to understand and change because the config loading logic from the provider and file are mixed. I refactored it to split the loading logic , i.e. loading from provider and file, to 2 methods, which made my changes easier. Later on I found other solution so the changes got dropped, but I am trying to push the refactor to see if anyone is interested.
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/go-mod-bootstrap/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
New Dependency Instructions (If applicable)