-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
added GoInitialismsConfig which overrides the initialisms to be regarded #2683
Conversation
Not sure yet how to test the whole |
…example entry "ID" to "CC" (again? I though I already did that)
Just took a short dive into go linting - didn't even expect such a thing to exist in Go due to its own strict styling specs. Anyway, fixed the faulty import. |
Sorry about that. You would be surprised at how pedantic some people can be about trivial stylistic formatting. Probably a habit picked up from Python. :) I don't really care about it much, as long as I can have a magic command to run that makes the code so everyone can focus on more important things. gofumpt and golines are quite reliable and can be used together:
For imports, goimports and gci work okay-ish:
With those last two, sometimes the comments get wonky, but either works most of the time. |
Thanks for your contribution! |
I see - thanks for these instructions! :) |
Thanks for your patience and contribution! I'm looking forward to your next PR! |
Fixes #1383 by adding another config option which allows to override the initialsms. Based on this discussion.
In general, the solution feels bit wonky, but I can't come up with something better. Ideally, methods like
ToGo
andToGoPrivate
would be bound to a method receiver which could - amongst other in the future - settings regarding the initialisms. This would break with plugins, though.I have: