-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add update-now functionality to TUF autoupdater #1579
Add update-now functionality to TUF autoupdater #1579
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.
NICE
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.
Woo! LGTM
binariesToUpdate := make([]autoupdatableBinary, 0) | ||
for _, b := range updateRequest.BinariesToUpdate { | ||
if val, ok := autoupdatableBinaryMap[b.Name]; ok { |
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.
You could invert this, and use https://pkg.go.dev/slices#DeleteFunc to remove non matches from updateRequest
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've got to build a new slice from updateRequest
anyway, might as well leave the request unmodified
Relates to: