Skip to content
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

Refactor container prune and rename command flagging process #1994

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

rkonfj
Copy link
Contributor

@rkonfj rkonfj commented Feb 9, 2023

Refactor container prune and rename command flagging process

Signed-off-by: rkonfj rkonfj@gmail.com

@rkonfj
Copy link
Contributor Author

rkonfj commented Feb 9, 2023

Part of #1680

@suyanhanx
Copy link
Contributor

Please split this into 2 PRs. One PR for one thing.

@rkonfj
Copy link
Contributor Author

rkonfj commented Feb 9, 2023

Please split this into 2 PRs. One PR for one thing.

Thank you very much for your guidance. This is a simple and minor change. Of course, if it does not conform to the community rules, I will split it later.

Comment on lines 51 to 54
for _, id := range deleted {
fmt.Fprintln(options.Stdout, id)
}
fmt.Fprintln(options.Stdout, "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this can be fmt.Fprintln(options.Stdout, strings.Join(deleted, "\n")

Comment on lines 58 to 63
n, err := walker.Walk(ctx, containerID)
if err != nil {
return err
} else if n == 0 {
return fmt.Errorf("no such container %s", containerID)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

	if n, err := walker.Walk(ctx, containerID); err != nil {
		return err
	} else if n == 0 {
		return fmt.Errorf("no such container %s", containerID)
	}

@suyanhanx
Copy link
Contributor

suyanhanx commented Feb 10, 2023

Please squash your commits.

Signed-off-by: rkonfj <rkonfj@gmail.com>
@fahedouch
Copy link
Member

@suyanhanx @djdongjin can we merge this ?

Copy link
Member

@djdongjin djdongjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@suyanhanx
Copy link
Contributor

LGTM.

Copy link
Member

@fahedouch fahedouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@fahedouch fahedouch merged commit 9c2c082 into containerd:main Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants