-
Notifications
You must be signed in to change notification settings - Fork 2.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
imagefilter dangling handling corrected #2885
imagefilter dangling handling corrected #2885
Conversation
Fixes the issue #2884 |
LGTM |
LGTM, assuming happy tests |
cmd/podman/imagefilters/filters.go
Outdated
return i.Dangling() | ||
if danglingImages { | ||
return i.Dangling() | ||
} else { |
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.
No need for the else block. Just return !i.Dangling()
cmd/podman/images.go
Outdated
@@ -359,6 +360,9 @@ func CreateFilterFuncs(ctx context.Context, r *adapter.LocalRuntime, filters []s | |||
var filterFuncs []imagefilters.ResultFilter | |||
for _, filter := range filters { | |||
splitFilter := strings.Split(filter, "=") | |||
if len(splitFilter) != 2 { | |||
return nil, fmt.Errorf("invalid filter syntax %s", filter) |
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.
Please use errors.Errorf()
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kunalkushwaha, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
imagefilter dangling=<value> shall not be ignored. this PR handles the value and returns images accordingly. Signed-off-by: Kunal Kushwaha <[email protected]>
b33a48d
to
034cc8a
Compare
Updated the PR as per review comments. |
/lgtm |
imagefilter dangling=<value>
shall not be ignored.this PR handles the value and returns images accordingly.
Signed-off-by: Kunal Kushwaha [email protected]