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

gotests generate test names with MixedCaps #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jeffbean
Copy link

@jeffbean jeffbean commented Sep 3, 2018

Change the gotests TestName function to follow the effective Go guide of MixedCaps.

This tool generates code that does not follow the Go effective style guide.

In this change we only change the TestName from adding _ to returning the Title version of the string that was intended for the test name. This give a MixedCaps test name.

Another angle would be to add a func to the Templates FuncMap to allow custom templates to replace the _s and Title the string in the template. This seems like a change that would best be default since it is following the effective Go guide.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 96.339% when pulling 974312f on jeffbean:test-mixedcaps into c51312f on cweill:master.

@cweill
Copy link
Owner

cweill commented Nov 9, 2019

You should contribute to the discussion at golang/go#33688. We should get consensus from the Go community about how to best generate tests like these.

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

3 participants