-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[chore] Small refactoring in builder config validation/parsing #11613
base: main
Are you sure you want to change the base?
Conversation
for _, mod := range mods { | ||
if mod.Import == "" { | ||
mod.Import = strings.Split(mod.GoMod, " ")[0] | ||
func parseModules(mods []Module) error { |
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.
This is changing the behaviour or parseModules to not return an updated version of the modules, is that wanted? Or should this be receiving []*Module
if we want to change the modules in place?
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.
Or should this be receiving []*Module if we want to change the modules in place?
Why? The slice is implemented as a pointer to memory and size/cap. The memory can be changed in place, we have tests for that.
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.
Signed-off-by: Bogdan Drutu <[email protected]>
ed4d02a
to
1223c7d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11613 +/- ##
==========================================
+ Coverage 91.53% 91.59% +0.06%
==========================================
Files 441 441
Lines 23922 23888 -34
==========================================
- Hits 21896 21880 -16
+ Misses 1650 1638 -12
+ Partials 376 370 -6 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
No description provided.