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

Why is it not part of the compiler? #16

Closed
SyrianSpock opened this issue Jan 28, 2020 · 1 comment
Closed

Why is it not part of the compiler? #16

SyrianSpock opened this issue Jan 28, 2020 · 1 comment

Comments

@SyrianSpock
Copy link

This is a very useful check. Why is it not part of the compiler?

@alexkohler
Copy link
Owner

alexkohler commented Jan 28, 2020

Thanks for the issue! Glad you find nakedret useful 🤠

nakedret takes the stance that naked returns are generally a source of bugs and take away from the simplicity of reading/writing Go code. That said, naked returns themselves are part of the Go language. There are fairly strong opinions on both sides - I'd encourage you to read golang/go#21291 to see both sides of the argument.

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

No branches or pull requests

2 participants