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

sort: function names should be mixed caps #26693

Closed
cia-rana opened this issue Jul 30, 2018 · 2 comments
Closed

sort: function names should be mixed caps #26693

cia-rana opened this issue Jul 30, 2018 · 2 comments

Comments

@cia-rana
Copy link
Contributor

@cia-rana cia-rana commented Jul 30, 2018

According to Effective Go, function names should be mixed caps, but *_func including the underscore is used for the ones in sort/zfuncversion.go generated by sort/genzfunc.go. Thus when generating these functions, we should use Func instead of _func.

@ALTree
Copy link
Member

@ALTree ALTree commented Jul 30, 2018

Thanks for the report.

The suggestions in the Effective Go document do not really apply to auto-generated code. In fact, I suspect the _func prefix was chosen exactly to make the functions look like they are auto-generated (as they are).

@ALTree ALTree added this to the Go1.12 milestone Jul 30, 2018
@robpike
Copy link
Contributor

@robpike robpike commented Jul 31, 2018

This is generated code. Such code is often non-conformant stylewise.

@robpike robpike closed this Jul 31, 2018
@golang golang locked and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.