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
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@cia-rana
Copy link
Contributor

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 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 the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jul 30, 2018
@ALTree ALTree added this to the Go1.12 milestone Jul 30, 2018
@robpike
Copy link
Contributor

robpike commented Jul 31, 2018

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

@robpike robpike closed this as completed 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.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants