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

Add comments to the Func definition #6056

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/util/filter/filter_function.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package filter

// Func is a function type that is the signature of a filter function used in log deletion.
// This is used as a parameter in the Rebound function.
type Func func(string) bool
Copy link
Contributor

Choose a reason for hiding this comment

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

I find it very problematic to name a function type just Func. Wouldn't it be better to name it after its functionality?

Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT of naming it Predicate? I think it is how Apache Spark and Java name a similar thing.