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

[Minor] Bad practice to have a mix of Receiver types. #491

Merged
merged 1 commit into from Jun 4, 2022

Conversation

MushuEE
Copy link
Contributor

@MushuEE MushuEE commented Apr 5, 2022

I was using an old version and saw that

r.contentEncodingEnabled = &enabled

Fix was added, however String() should be updated to also use a pointer receiver.

Per Golang Docs "In general, all methods on a given type should have either value or pointer receivers, but not a mixture of both."

I was using an old version and saw that 
```
r.contentEncodingEnabled = &enabled
```
Fix was added, however String() should be updated to also use a pointer receiver.

Per Golang Docs "In general, all methods on a given type should have either value or pointer receivers, but not a mixture of both."
@emicklei emicklei merged commit f04c271 into emicklei:v3 Jun 4, 2022
@emicklei
Copy link
Owner

emicklei commented Jun 4, 2022

thank you for contributing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants