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

Be consistent with receiver type on method definitions #6165

Open
3 tasks
DimitrisJim opened this issue Apr 15, 2024 · 0 comments
Open
3 tasks

Be consistent with receiver type on method definitions #6165

DimitrisJim opened this issue Apr 15, 2024 · 0 comments
Labels
needs discussion Issues that need discussion before they can be worked on type: code hygiene Clean up code but without changing functionality or interfaces

Comments

@DimitrisJim
Copy link
Contributor

Reference comment: #6103 (comment)

We should try and not mix and mash pointer-value receivers on methods and instead consistently use one or the other. For types that need mutations and already have a method that receives value as a pointer, rest of methods can be amended to change from a value receiver to a pointer.

For small types that don't have a pointer receiver currently and also aren't costly to pass around as args, we can stick with value receivers.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@DimitrisJim DimitrisJim added needs discussion Issues that need discussion before they can be worked on type: code hygiene Clean up code but without changing functionality or interfaces labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Issues that need discussion before they can be worked on type: code hygiene Clean up code but without changing functionality or interfaces
Projects
None yet
Development

No branches or pull requests

1 participant