-
Notifications
You must be signed in to change notification settings - Fork 174
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: refactor findImages
to remove print statements
#3236
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for zarf-docs canceled.
|
if len(images) > 0 { | ||
fmt.Println(IMAGES) | ||
for i := 0; i < len(images); i++ { | ||
fmt.Printf(IMAGE, images[i]) |
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 was not sure if printing them out with the fmt.Print
functions was the correct way to handle this, I did not see a good log level to put it in the logger.
Please let me know if you want me to update this
Signed-off-by: Allen Conlon <[email protected]>
52fcc88
to
42bf38a
Compare
We are currently in the process of refactoring the pacakger function so find images will be completely re-written. During this refactoring printing will be deferred to the CLI. |
Ah ok, thank you @phillebaba for the clarification. I'm wanting to put some effort into addressing #2865 for automatically updating the |
I can also close this PR if that is preferred for you |
I am not looking into changing the existing behavior for find images. So the refactor will still in the end print the found images. the difference being is that the exported library will return a slice instead of printing the results. I would suggest bringing up the issue to change the behavior of find images at the next community meeting of possible. It will be a lot easier to implement this suggested change after the refactor is done. |
Description
Refactor of
findImages
remove print states from inside the function. It now passes the image map to thedevFindImagesCmd
which prints a similar table as before.A regression is that we lost the easy ability add the comment blocks for the
maybe
images andcosign
artifacts.Related Issue
Relates to #2865
Checklist before merging