-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix previous name checking in 'executor.build.fetchExtraStages' #1167
fix previous name checking in 'executor.build.fetchExtraStages' #1167
Conversation
e32e9f6
to
7a084da
Compare
for _, name := range names { | ||
if name == c.From { | ||
continue |
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.
Definitely not a golang expert here, but pretty sure you could use a continue
statement with label instead of a boolean flag.
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.
@gilbsgilbs I am not a golang expert either, however I've been instructed not to ever use a label .. Out of machine language, I guess. A better solution would be to isolate this piece of code in a dedicated function I guess
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.
I isolated this code in a dedicated function. Great profile picture by the way 😄
7a084da
to
7889623
Compare
7889623
to
3244569
Compare
3244569
to
d763b7e
Compare
@tejal29 Guess I was right to wait as retrying the build with the current code works. This change is a minor one...Do I need to add some unit test? |
@antechrestos this is very minor and small refactor. You don't need to add tests! |
thanks |
Description
Fixes minor bug in
fetchExtraStages
function. Thecontinue
instruction only breaks the innerfor
loop instead of the outer one. (see example of two for loop and a continue in inner one)Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes