-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
SA: Create list of authzIDs earlier in NewOrderAndAuthzs #7744
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.
nits:
The title of the PR doesn't give me a very clear idea what it does. Also, when we're touching a single discrete component we often (not universally) use that component as a prefix. I might say:
sa: create list of authzIDs earlier in NewOrderAndAuthzs
Also, the PR description should mention the movement of addReplacementOrder
and getAuthorizationStatuses
and have a short explanation of why it's clearer or better.
One thing I noticed related to the reordering: I think you should also be able to move statusForOrder
above the res := &corepb.Order{
line too. That would be nice because you can replace res.Status = status
with a field assignment inside the object creation (Status: status
). And you could also combine the object literal with the return statement:
return &corepb.Order{
Status: status,
...
}, nil
Since |
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.
LGTM % Phil's comment.
Creating the list of authzIDs earlier in NewOrderAndAuthzs:
for
loop with duplicated code; we no longer need to range over two different slices, just one.