We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As designed the image loader effectively uses errors for downstream control flow. This:
if b, err := loadimage.NewBuilder().WithImage(imageLoad); err == nil { addons = append(addons, b.Build()) }
handles the imageLoad == '' condition by relying on the builder returning an error, when it could have used a conditional on imageLoad's value.
imageLoad == ''
imageLoad
Use a conditional instead, and fail on any error.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Problem Statement
As designed the image loader effectively uses errors for downstream control flow. This:
handles the
imageLoad == ''
condition by relying on the builder returning an error, when it could have used a conditional onimageLoad
's value.Proposed Solution
Use a conditional instead, and fail on any error.
The text was updated successfully, but these errors were encountered: