-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add comments to the Func definition #6056
Conversation
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
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.
Would it be possible to move Func
to either of deletion
or chunkenc
package i.e where it is used?
@@ -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 |
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 find it very problematic to name a function type just Func
. Wouldn't it be better to name it after its functionality?
@@ -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 |
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.
WDYT of naming it Predicate
? I think it is how Apache Spark and Java name a similar thing.
Hi! This issue has been automatically marked as stale because it has not had any We use a stalebot among other tools to help manage the state of issues in this project. Stalebots are also emotionless and cruel and can close issues which are still very relevant. If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry. We regularly sort for closed issues which have a We may also:
We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, |
Explain the filter func better. This was mentioned as a review comment in #5879.
Checklist
CHANGELOG.md
.docs/sources/upgrading/_index.md
Signed-off-by: Michel Hollands michel.hollands@grafana.com