-
Notifications
You must be signed in to change notification settings - Fork 601
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
refactor: container list flagging process #1966
Conversation
@@ -149,3 +149,24 @@ type ContainerExecOptions struct { | |||
// Username or UID (format: <name|uid>[:<group|gid>]) | |||
User string | |||
} | |||
|
|||
type ContainerListOptions struct { |
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.
Can you add a brief comment here?
"github.com/sirupsen/logrus" | ||
) | ||
|
||
func List(ctx context.Context, client *containerd.Client, options types.ContainerListOptions) error { |
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.
can you add a brief comment here?
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.
// 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!
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.
SGTM.
Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
9730e30
to
3eedefa
Compare
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.
Thanks
Part of #1680
pkg/api/types/${cmd}_types.go
, and define the CommandOption for this commandpkg/cmd/${cmd}
, and move the command entry point in real into this packageSigned-off-by: Hsing-Yu (David) Chen davidhsingyuchen@gmail.com