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 list flagging process #1966

Merged

Conversation

davidhsingyuchen
Copy link
Contributor

Part of #1680

  • Create a file in pkg/api/types/${cmd}_types.go, and define the CommandOption for this command
  • Create some file in pkg/cmd/${cmd}, and move the command entry point in real into this package

Signed-off-by: Hsing-Yu (David) Chen davidhsingyuchen@gmail.com

@davidhsingyuchen davidhsingyuchen marked this pull request as ready for review February 2, 2023 22:35
@@ -149,3 +149,24 @@ type ContainerExecOptions struct {
// Username or UID (format: <name|uid>[:<group|gid>])
User string
}

type ContainerListOptions struct {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a brief comment here?

"github.com/sirupsen/logrus"
)

func List(ctx context.Context, client *containerd.Client, options types.ContainerListOptions) error {
Copy link
Member

Choose a reason for hiding this comment

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

can you add a brief comment here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

// List prints containers according to options.

Since there're things other than Filters that control what containers should be printed (e.g., All, LastN, etc.), I didn't go into explaining the details. Please let me know if this works for you, thanks!

Copy link
Member

Choose a reason for hiding this comment

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

SGTM.

Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 2dbc876 into containerd:main Feb 15, 2023
@davidhsingyuchen davidhsingyuchen deleted the refactor-container-list branch February 16, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants