-
Notifications
You must be signed in to change notification settings - Fork 642
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
feat: adding filter infrastructure + status and event filter #3247
Conversation
c087896
to
7a2a1f2
Compare
@AkihiroSuda PTAL when you get the chance |
@@ -1276,7 +1276,7 @@ Flags: | |||
|
|||
- :whale: `--format`: Format the output using the given Go template, e.g, `{{json .}}` |
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.
The new flag docs can be added 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.
Added events --filter
docs. PTAL and let me know if this is sufficient. @yankay
pkg/cmd/system/events.go
Outdated
// EventFilter for filtering events | ||
type EventFilter func(*EventOut) bool | ||
|
||
// Similar to podman implementation: |
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.
In Golang, usually, the comments should start with the Function Name. When documenting a function, the first sentence should typically start with the function's name. This format helps quickly clarify the function’s purpose.
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.
I changed the comments. Let me know if that works.
Signed-off-by: CodeChanning <[email protected]>
7a2a1f2
to
0721f44
Compare
@AkihiroSuda |
|
||
isDocker := testutil.GetTarget() == testutil.Docker | ||
if isDocker && tc.dockerSkip { | ||
t.Skip("test is incompatible with Docker") |
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.
Could you add a comment to explain the reason?
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.
ping @CodeChanning
I guess this is safe to cherry-pick. Feel free to open cherry-pick PRs after merging to the main branch. |
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
Implementing
--filter
flag fornerdctl events
, Addresses part of #54This change adds infrastructure for adding filters. Similar to Podman's implementation of
--filter
.I also added Status and Event filter and unit tests for those.
Context: