-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Make all GoroutinesChecker methods be on a pointer receiver #35125
Conversation
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
This pull request doesn't have a |
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.
Hmm, I like the consistency but is there a reason we couldn't do it the other way around, i.e. remove the pointer requirement on the one remaining method? I don't see anything that requires mutability.
(cherry picked from commit b062987)
You're right, it could be the other way around. Sorry I saw the approval and merged, only after I saw your comment :/ |
…35142) (cherry picked from commit b062987) Co-authored-by: Anderson Queiroz <[email protected]>
What does this PR do?
Make all GoroutinesChecker methods be on a pointer receiver
Why is it important?
It's not recommended to mix methods on the same type having a pointer and a non-pointer receiver.
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
N/A
Related issues
N/A